15,979
社区成员
发帖
与我相关
我的任务
分享
CMenu Popup;
Popup.CreatePopupMenu();
Popup.AppendMenu(MF_STRING, ID_111 _T("111"));
Popup.AppendMenu(MF_STRING, ID_222, _T("222"));
//...
DWORD dwPos = GetMessagePos();
CPoint Point(LOWORD(dwPos), HIWORD(dwPos));
Popup.TrackPopupMenu(TPM_CENTERALIGN | TPM_RIGHTBUTTON, Point.x, Point.y, this);
Popup.Detach();