在vc++里面,debug模式运行出错,但在release模式下能正常运行,怎么办?
vfe 2002-07-22 08:05:09 在vc++里面,debug模式运行出错,但在release模式下能正常运行,怎么办?
我只是想在子窗体中调用主窗体的菜单!
如下:
void CTrsWnd::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu menu;
VERIFY(menu.LoadMenu(IDR_POPUPMENU));
(CMainFrame*)m_pFrame =(CMainFrame*)AfxGetApp()->m_pMainWnd;
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
//CWnd* pWndPopupOwner = this;
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, m_pFrame);
}
有什么别的好办法吗?
谢谢!