jasonzhangx
Programmer
I am building an explorer like GUI using contextmenu. The section of triggering the menu is as follow:
CMenu menu;
menu.LoadMenu(IDR_MENU_Phi);
CMenu *pContextMenu=menu.GetSubMenu(0);
ASSERT(pContextMenu);
pContextMenu->TrackPopupMenu(TPM_CENTERALIGN
|TPM_RIGHTBUTTON |TPM_LEFTBUTTON, point.x, point.y, this);
The contextmenu is showing up at the corner of the screen, but mouse click position is far from that position. point.x and point.y should be the mouse click position. Any suggestions?
CMenu menu;
menu.LoadMenu(IDR_MENU_Phi);
CMenu *pContextMenu=menu.GetSubMenu(0);
ASSERT(pContextMenu);
pContextMenu->TrackPopupMenu(TPM_CENTERALIGN
|TPM_RIGHTBUTTON |TPM_LEFTBUTTON, point.x, point.y, this);
The contextmenu is showing up at the corner of the screen, but mouse click position is far from that position. point.x and point.y should be the mouse click position. Any suggestions?