右键弹出菜单
来源:优易学  2011-12-19 16:18:47   【优易学:中国教育考试门户网】   资料下载   IT书店
  void CLeftView::OnRButtonDown(UINT nFlags, CPoint point)
  {
  // TODO: Add your message handler code here and/or call default
  CTreeView::OnRButtonDown(nFlags, point);
  CMenu PopMenu;
  CMenu *pMenu;
  CPoint pt;
  pt= point;
  PopMenu.LoadMenu(IDR_EDIT); //菜单ID
  ClientToScreen(&pt);
  pMenu = PopMenu.GetSubMenu(0);
  pMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,
  pt.x,pt.y,this);
  }

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训