Archived

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

Emexus

Win32 Maxamize

Recommended Posts

Hi, Im having some trouble maxamizing my application when it starts up, my code is as follows.
  

hWnd = CreateWindow(
		   szAppName,		
		   "test",
		   WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX | WS_MAXIMIZE,	
		   CW_USEDEFAULT,			
		   CW_USEDEFAULT,				
		   CW_USEDEFAULT,				
		   CW_USEDEFAULT,			
		   0,							
		   0,							
		   hInstance,					
		   0							          );
  
cheers for any help

Share this post


Link to post
Share on other sites
You need to specify WS_VISIBLE to make use WS_MAXIMIZE I think.
Else you could simply use SW_MAXIMIZE in your ShowWindow call.

Share this post


Link to post
Share on other sites
cheers for the reply,

WS_VISIBLE dosent seem to make any difference, an i really want to set it as maximised in this structure,
it is really confusing me.
cheers

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
don''t do it that way. Take out the maximize flag and when you call ShowWindow, use ShowWindow(SW_MAXIMIZE);

Share this post


Link to post
Share on other sites
See, you aren''t saying what you are using when you are calling ShowWindow. I''m betting that you are currently overriding the window style.

Share this post


Link to post
Share on other sites