Win32 Maxamize

Started by
4 comments, last by Emexus 20 years, 10 months ago
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
Advertisement
You need to specify WS_VISIBLE to make use WS_MAXIMIZE I think.
Else you could simply use SW_MAXIMIZE in your ShowWindow call.
.
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
don''t do it that way. Take out the maximize flag and when you call ShowWindow, use ShowWindow(SW_MAXIMIZE);
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.
.
yup your both rite, i was overiding the window style,
thanks for the help guys

This topic is closed to new replies.

Advertisement