VS2010里怎么使用DeletMenu()?
比如我用VC++ MFC application 建了一个单文档,
在OnCreate
{
.......
lstBasicCommands.AddTail(ID_VIEW_APPLOOK_OFF_2007_BLACK);
lstBasicCommands.AddTail(ID_VIEW_APPLOOK_OFF_2007_AQUA);
lstBasicCommands.AddTail(ID_VIEW_APPLOOK_WINDOWS_7);
CMFCToolBar::SetBasicCommands(lstBasicCommands);
GetMenu()->DeleteMenu(1,MF_BYPOSITION);
return 0;
}
VS2010里生成的OnCreate很长,我就不写全了.
编译没有错,运行时报了
Menu2.exe': Loaded 'C:\Windows\System32\cryptsp.dll', Cannot find or open the PDB file
'Menu2.exe': Loaded 'C:\Windows\System32\rsaenh.dll', Cannot find or open the PDB file
'Menu2.exe': Loaded 'C:\Windows\System32\RpcRtRemote.dll', Cannot find or open the PDB file
First-chance exception at 0x55549c8c (mfc100ud.dll) in Menu2.exe: 0xC0000005: Access violation reading location 0x00000004.
Unhandled exception at 0x55549c8c (mfc100ud.dll) in Menu2.exe: 0xC0000005: Access violation reading location 0x00000004.
这是什么问题?
<我用的是孙鑫的书>