A simple question

This is a discussion on A simple question within the Windows Programming forums, part of the Platform Specific Boards category; Hi: How can I fix the size of the window, user can't resize or maxmize it(disable maxmize button) I just ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    A simple question

    Hi:

    How can I fix the size of the window, user can't resize or maxmize it(disable maxmize button) I just could not find the flag, it is just like WS___??or something? Thanks you!!
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002
    Posts
    640
    do a search for window styles

    WS_SYSMENU | WS_MINIMIZEBOX
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    Thanks, but if the window is a child window, it is created by
    CreateMDIWindow(), Seems there are only 4 styles:

    WS_MINIMIZE
    WS_MAXIMIZE
    WS_VSCROLL
    WS_HSCROLL

    what should I do then?
    Don't laugh at me,I am just a SuperNewbie.

  4. #4
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    ...it is created by CreateMDIWindow...
    unless it is an MDI application, all windows can be created with CreateWindow, and therefore, have access to all the styles(im lieing here, there are some styles only available to the main window).

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    So there is no other way out?
    Don't laugh at me,I am just a SuperNewbie.

  6. #6
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    but if the window is a child window, it is created by CreateMDIWindow()
    You CAN create it with CreateWindow() and/or CreateWindowEx(). That way you can pick what styles you want, minus the styles only available to main windows.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    OK, I think this is the at lease one way to work with CreateWindow():

    dwstyle:

    Code:
    WS_CHILD | ALLCHILDSTYLES | WS_VISIBLE | WS_CLIPSIBLINGS| WS_MINIMIZEBOX | WS_SYSMENU | WS_CAPTION
    Bolded style might not be necessary, I don't know that.

    Thanks for you all great help.
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 08:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-20-2005, 11:41 PM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 08:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 11:15 AM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 05:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21