ClientToScreen is obsolete?

I just started learning a little Visual C++.
I have a question about pop up menus and the way to handle them:

CMenu *m_lMenu;
CPoint m_pPoint;
   m_pPoint = point;
   ClientToScreen(&m_pPoint);//  I guess it's old..
   m_lMenu = GetMenu()->GetSubMenu(0);
   m_lMenu->TrackPopupMenu(TPM_CENTERALIGN + TPM_LEFTBUTTON  , m_pPoint.x, m_pPoint.y, this, NULL);


The following code creates a pop menu no the mouse pointer, but something confuses me...
the popup menu pops at a way different position on the screen, no where near the mouse.

now, if I remove the ClientToScreen convertion and use the original positions, it will pop near the mouse just fine.

Just wondring ..... Wasn't this suppose to be the right way to do it?
is ClientToScreen obsolete and not used anymore? and the original positions enough? to determine the screen coordinates?
Who is Participating?
AlexFMConnect With a Mentor Commented:
ClientToScreen is not obsolete. If this happenes as you describe, point is already in screen coordinates.
Jaime OlivaresSoftware ArchitectCommented:
You have not specified the event of function where you trap the mouse click.
Jaime OlivaresSoftware ArchitectCommented:
Still awaiting for author feedback
All Courses

From novice to tech pro — start learning today.