MainFrm.cpp打开——>找到BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) 如下: BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return TRUE; } 在里面就可以修改初始窗口大小了!
例子: 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.cx=500; cs.cy=500; return TRUE;