void CHardDlg::OnRButtonUp(UINT nFlags, CPoint point)
{
CMenu menu,*pmenu;
menu.LoadMenu(IDR_MENU);
pmenu=menu.GetSubMenu(0);
CPoint ptScreen(point);
ClientToScreen(&ptScreen);
pmenu->TrackPopupMenu(TPM_RIGHTBUTTON,ptScreen.x,ptScreen.y,this);
// TODO: Add your message handler code here and/or call default
CDialog::OnRButtonUp(nFlags, point);
}编译完后出现:error C2065: 'IDR_MENU' : undeclared identifier
执行 cl.exe 时出错.请问大家这是什么原因 谢谢 望详细些 本人愚钝
{
CMenu menu,*pmenu;
menu.LoadMenu(IDR_MENU);
pmenu=menu.GetSubMenu(0);
CPoint ptScreen(point);
ClientToScreen(&ptScreen);
pmenu->TrackPopupMenu(TPM_RIGHTBUTTON,ptScreen.x,ptScreen.y,this);
// TODO: Add your message handler code here and/or call default
CDialog::OnRButtonUp(nFlags, point);
}编译完后出现:error C2065: 'IDR_MENU' : undeclared identifier
执行 cl.exe 时出错.请问大家这是什么原因 谢谢 望详细些 本人愚钝
你用TextMode打开你的.rc 文件看看。 或者直接在资源栏查看你的弹出菜单项是不是正确弄好了