方法1:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.x=cs.y=0;
cs.cx=GetSystemMetrics(SM_CXSCREEN);
cs.cy=GetSystemMetrics(SM_CYSCREEN);
return TRUE;
}
方法2
void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
nCmdShow = SW_SHOWMAXIMIZED;
CFrameWnd::ActivateFrame(nCmdShow);
}
ActivateFrame() 为一个重载函数,这样就不会出现闪烁了。