右键菜单的问题!!
no111 2005-06-06 10:45:34 程序如下:
void CMyDemoDlg::OnRButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMenu menu1,*pmenu;
menu1.LoadMenu(IDR_MENU3);
pmenu->GetSubMenu(0);
/*CPoint hpoint;
GetCursorPos(&hpoint);
ClientToScreen( &hpoint );*/
pmenu->TrackPopupMenu(TPM_LEFTALIGN,point.x,point.y,this);
CDialog::OnRButtonDown(nFlags, point);
}
编译时无错,可当我运行时,一按鼠标右键,就会遇到“Demo.exe 遇到问题需要关闭”的问题,这是为神马阿?