Introduction - If you have any usage issues, please Google them yourself
Get the mouse position (at the location of the screen)
CPoint m_mouse;
GetCursorPos (&m_mouse);
2. The screen is converted to the client (the relative position of the control) & the client position is converted to the screen position
ClientToScreen (this->m_hwnd, m_mouse); / / client position into the screen position
ScreenToClient (this->m_hwnd, m_mouse); / / screen into the client
3. Get the control about the location on the screen
CRect RC
GetWindowRect (&rc);
4, the way to detect the action of the mouse is more, and the more it uses is the callback mouse hook (low hook) function introduced on the MSDN.