MFC中菜单相关

1、弹出式菜单

CMenu menu;
  menu.LoadMenu(IDR_MENU_TADOY);
  CMenu *pContextMenu = menu.GetSubMenu(0);
  CPoint pt;
  GetCursorPos(&pt);
  pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,pt.x,pt.y,AfxGetMainWnd());

你可能感兴趣的:(MFC中菜单相关)