Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Two questions

DonotaloDonotalo Member Posts: 715
[purple]1. i want to make my window maximized when it is first shown in the screen. so my CreateWindow() looks like:[code]
hwnd = CreateWindow(szWinName,
"XYZ",
[red]WS_MAXIMIZE[/red] | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_SYSMENU,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hThisInst,
NULL);
[/code]
when i run my program from the compiler (Build + Run), it is maximized. but when i run it by double clicking on the .exe icon, it is not maximized! i'm puzzled! what is wrong? i'm using dev c++.

2. what message a window function gets when the window is maximized by clicking on the maximize button, or restored again by clicking the maximize button?

thanks in advance.
[/purple]
[hr][purple]~Donotalo()[/purple]

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : [purple]1. i want to make my window maximized when it is first shown in the screen. so my CreateWindow() looks like:[code]
    : hwnd = CreateWindow(szWinName,
    : "XYZ",
    : [red]WS_MAXIMIZE[/red] | WS_MINIMIZEBOX |
    : WS_MAXIMIZEBOX | WS_SYSMENU,
    : CW_USEDEFAULT,
    : CW_USEDEFAULT,
    : CW_USEDEFAULT,
    : CW_USEDEFAULT,
    : NULL,
    : NULL,
    : hThisInst,
    : NULL);
    : [/code]
    : when i run my program from the compiler (Build + Run), it is maximized. but when i run it by double clicking on the .exe icon, it is not maximized! i'm puzzled! what is wrong? i'm using dev c++.
    :
    [blue]Without debugging it is hard to say what is wrong. However, try to call ShowWindow() with SHOW_MAXIMIZED flag after the window is created.[/blue]

    : 2. what message a window function gets when the window is maximized by clicking on the maximize button, or restored again by clicking the maximize button?
    [blue]WM_SYSCOMMAND (and then WM_SIZE)[/blue]
    :
    : thanks in advance.
    : [/purple]
    : [hr][purple]~Donotalo()[/purple]
    :

Sign In or Register to comment.