BCGControlBar Pro for MFC
virtual UINT CBCGPContextMenuManager::TrackPopupMenu ( HMENU  hmenuPopup,
int  x,
int  y,
CWnd *  pWndOwner,
BOOL  bRightAlign = FALSE 

Displays a shortcut menu at the specified location and tracks the selection of items on the menu.

ID of the choosen command or 0.

Call this member function to display popup menu anywhere on the screen.

hmenuPopupPopup menu handle.
xThe horizontal screen coordinate of the top-left menu corner .
yThe vertical screen coordinate of the top-left menu corner.
pWndOwnerOwner window.
bRightAlignIf TRUE, the menu is right-aligned (for RTL reading order).