Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vbisme

Window Won't Maximize

This topic is 6512 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to create a window that is initially maximize, but it won't!
    
///Create the main window

	if (!(hWnd = CreateWindowEx(NULL, "MainWinClass", "Main Window",
		WS_MAXIMIZE | WS_OVERLAPPEDWINDOW | WS_VISIBLE,
		0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
		NULL, NULL,
		hInstance, NULL)))
	{
		return(0);
	}//end if

    
And oh, while maximized, it's still "movable" ... how do I stop that? Edited by - vbisme on 11/27/00 10:26:03 PM

Share this post


Link to post
Share on other sites
Advertisement
I think you should try calling maximaize during the CREATEWINDOW message. That way it will be momentarly non-maximized, but should work every time. Or you could initially set the window to the screen size.

Good luck

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
After you''ve created your window call

ShowWindow( hWnd, SW_SHOWMAXIMIZED );

Hope that helps ya...

n!

Share this post


Link to post
Share on other sites
Both of those ways opens the window "then" maximize it. Is there not a way to maximize it "initialily" ?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The window doesn''t get displayed until you call ShowWindow. If ShowWindow isn''t called with SW_SHOWMAXIMIZED then it wont be shown maximized. If ShowWindow isn''t called at all then the window won''t be displayed at all.

n!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try creating it without WS_VISIBLE then calling ShowWinodw

n!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!