Tech Support > Microsoft Windows > Development Resources > Trying to create a window that is maximized
Trying to create a window that is maximized
Posted by TheTempest on July 11th, 2003


Hi,

I have tryed passing WS_MAXIMIZE as a style in my CreateWindow
function, but it doesn't work. My only other style that i'm currently
using is: WS_OVERLAPPED.

Any ideas?
~Thanks~

Posted by Sten Westerback on July 11th, 2003


Use WS_OVERLAPPEDWINDOW which includes the
Maximize button which also enables maximize style...

- Sten
"TheTempest" <wannabegenius15@hotmail.com> wrote in message
news:79c7484c.0307102259.785cb751@posting.google.c om...


Posted by Anaz on July 11th, 2003


wannabegenius15@hotmail.com (TheTempest) wrote in message news:<79c7484c.0307102259.785cb751@posting.google. com>...
Hi,
Your problem is not specific.
pls recheck your "CreateWindow()" function and it's parameters.
read MSDN for further help.
eg.
hwnd = CreateWindow(
"MainWClass", // name of window class
"SampleWindow", // title-bar string
WS_MAXIMIZE, // maximized window
CW_USEDEFAULT, // default horizontal position
CW_USEDEFAULT, // default vertical position
CW_USEDEFAULT, // default width
CW_USEDEFAULT, // default height
(HWND) NULL, // no owner window
(HMENU) NULL, // use class menu
hinstance, // handle to application instance
(LPVOID) NULL); // no window-creation data

Regards
[Anaz K Kabeer]

Posted by ef on July 11th, 2003


TheTempest wrote:
You could try creating the window without WS_VISIBLE and then call
ShowWindow(hWnd, SW_SHOWMAXIMIZED)



Similar Posts