右键弹出快捷菜单

void CAsdfView::OnRButtonUp (UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default CMenu menu; menu.LoadMenu(IDR_MENU1); CMenu *subMenu=menu.GetSubMenu(0); CPoint pt(point); ClientToScreen(&pt); subMenu->TrackPopupMenu(TPM_TOPALIGN|TPM_LEFTALIGN,pt.x,pt.y,this); CView::OnRButtonUp(nFlags, point); }

你可能感兴趣的:(menu)