how to maximize window
-
Hi, I have developed program in which I am creating window.I want to maximize window size before its creation.Can anyone suggest me. Rekha.
-
Hi, I have developed program in which I am creating window.I want to maximize window size before its creation.Can anyone suggest me. Rekha.
Override the
PreCreateWindow
method in the main window class. Add theWS_MAXIMIZE
style to thestyle
member of theCREATESTRUCT
parameter like so.cs.style |= WS_MAXIMIZE
«_Superman_» I love work. It gives me something to do between weekends.
-
Override the
PreCreateWindow
method in the main window class. Add theWS_MAXIMIZE
style to thestyle
member of theCREATESTRUCT
parameter like so.cs.style |= WS_MAXIMIZE
«_Superman_» I love work. It gives me something to do between weekends.
Hi, I have overriden PreCreateWindow like this.But I am unable to create maximized window.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~FWS_ADDTOTITLE;
cs.style |= WS_MAXIMIZE;
return TRUE;
} -
If you want to maximize the window call
ShowWindow()
withSW_MAXIMIZE
. Take a look at the docs here. Regards, --PerspxHi, I used ShowWindow(SW_MAXIMIZE) in PreCreateWindow function like this.But I am unable to create maximized window.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
f( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~FWS_ADDTOTITLE;
ShowWindow(SW_MAXIMIZE);return TRUE;
}
-
Hi, I used ShowWindow(SW_MAXIMIZE) in PreCreateWindow function like this.But I am unable to create maximized window.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
f( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style &= ~FWS_ADDTOTITLE;
ShowWindow(SW_MAXIMIZE);return TRUE;
}