-
Contexual Menu
im trying to make a context menu, (or pop-up menu) and this code is screwing me over, tell me whats wrong
Code:
CMenu *m_lMenu; //pointer to the menu
CPoint m_pPoint; //mouse position
//copy the mouse position to a local var
m_pPoint = point;
//convert the position to a local var
ClientToScreen(&m_pPoint);
//get a pointer to the window menu
m_lMenu - GetMenu();
//get a pointer to the first submenu
m_lMenu = m_lMenu->GetSubMenu(0);
//show the popup menu
m_lMenu->TrackPopupMenu(TPM_CENTERALIGN + TPM_LEFTBUTTON, m_pPoint.x, m_pPoint.y, this, NULL);
-
// get a pointer to the window menu
>> m_lMenu - GetMenu();
...er, looks more like subtraction to me...typo?
-
-
errrrr, is it? woah, ive never been more confused
-
where do you define/assing point?
-
you might wanna try replacing the '-' with a '='
-
thanx face, but now my positioning is way off
edit << nevermind, fixed