我建了一个右键菜单,第一项不能用,点击后无效,第二项是可以用的,在菜单里的第一项是可以用的。我的第一项有个弹出对话框,怎么解决。谢谢!!
我的代码:
void CRapeseedGrowthView::OnContextMenu(CWnd* pWnd, CPoint point) 
{
// TODO: Add your message handler code here
  CMenu menu;
      menu.LoadMenu(IDR_MAINFRAME);
//    CMenu *submenu=menu.GetSubMenu(0); //对应你自定义菜单的第一列
//   submenu->TrackPopupMenu;
      menu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
  point.x, point.y, this);
}