请教高手,怎样去除多文档框架的菜单??
我修改了下面的函数,可是给出断言:BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs if(cs.hMenu!=NULL)
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
return CMDIFrameWnd::PreCreateWindow(cs);
}
是不是还要在其它什么地方修改?这个工程是用VC60+SP5,多文档类型,默认设置生成。
我修改了下面的函数,可是给出断言:BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs if(cs.hMenu!=NULL)
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
return CMDIFrameWnd::PreCreateWindow(cs);
}
是不是还要在其它什么地方修改?这个工程是用VC60+SP5,多文档类型,默认设置生成。
{
cs.style &=WS_SYSMENU; return CMDIFrameWnd::PreCreateWindow(cs);
}try!
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
WM_USER,
RUNTIME_CLASS(CTest_mdiDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CTest_mdiView));
AddDocTemplate(pDocTemplate);