I created an SDI application,the view based on CFormView. I want to maximize the mainframe window,once the application starts, I changed the code that added by wizard in InitInstance() function , as following.//m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);Though it is maximized,but there is a flash:Before maximized mainframe was showed, I found it was painted with a small size.
(I did not add any other codes).Why? Would u please help me?!
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);Though it is maximized,but there is a flash:Before maximized mainframe was showed, I found it was painted with a small size.
(I did not add any other codes).Why? Would u please help me?!
应该是
void CMainFrame::ActivateFrame(int nCmdShow)
{ nCmdShow = SW_MAXIMIZE; CFrameWnd::ActivateFrame(nCmdShow);
}