Re: Start app maximized
In InitInstance() where is says:
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
set m_nCmdShow to SW_MAXIMIZE
m_nCmdShow = SW_MAXIMIZE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
Tom
"JoeB" <joe@nospam.com> wrote in message
news:%23WdhgDBpGHA.4268@TK2MSFTNGP04.phx.gbl...
Hi,
How can i start my app maximized and prohibit resizing the app. So I can
have maximized and minimized but not in between.
This doesn't seem to work:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// Modify the Window class or styles here by modifying the CREATESTRUCT
cs
cs.style =
WS_OVERLAPPEDWINDOW |
WS_OVERLAPPED | // main window
WS_CAPTION | // title bar
WS_MINIMIZEBOX | // minimise box
WS_MAXIMIZEBOX | // maximise box
// WS_SIZEBOX |
WS_MAXIMIZE | // create maximised
WS_SYSMENU | // sysmenu and icon
0x00;
// clear the resize box
cs.style = cs.style & (~WS_SIZEBOX);
return CFrameWnd::PreCreateWindow(cs);
}
J