How to resize the MainFrame

mfc example 7th Viewer3d

I'd like to fix the MainFrame size

I've tried like following but it didn't work.

BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs = 1600; = 1020;
return CView::PreCreateWindow(cs);

P Dolbey's picture

The main frame window is an instance of OCC_MainFrame, derived from CMDIFrameWnd and NOT CViewer3dView derived from CView. Look to changing the sizes of pMainFrame in the app InitInstance.