removing menu in MFC document\view architecture
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all ! How do i remove (completely) the menu from an existing MFC SDI application ? (I need only the Toolbar) Thanks, Amit
-
Hi all ! How do i remove (completely) the menu from an existing MFC SDI application ? (I need only the Toolbar) Thanks, Amit
As per the MSDN it should like below:- BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; if(NULL != cs.hMenu ) { ::DestroyMenu(cs.hMenu); // delete menu if loaded cs.hMenu = NULL; // no menu for this window } return TRUE; }