-
MDI without menus
I am trying to make a full screen MDI but I am getting troubles when trying to get rid of the menus. A debug failure occurs when ::CreateEx is trying to execute. This happens in the InitInstance when trying to load the Main frame. I will be grateful if someone shows me the trick? I do not want to register new wndclass and I do not want to hide the menus.
-
Re: MDI without menus
If you're trying to remove the main menu, try this...
//
// Destroys normal menu associated with
// mainframe application.
//
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if ( cs.hMenu != NULL )
{
::DestroyMenu( cs.hMenu ); // Delete menu if loaded
cs.hMenu = NULL; // No menu for main window
}
return CFrameWnd::PreCreateWindow(cs);
}