- Category:
- Windows Develop
- Tags:
-
- File Size:
- 2kb
- Update:
- 2018-03-28
- Downloads:
- 0 Times
- Uploaded by:
- 菲尔顿
Description: 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.
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
mouse | 0 | 2018-03-28
|
mouse\main.cpp | 1988 | 2017-06-26
|
mouse\MouseAndPixel.vcxproj | 7295 | 2017-06-19
|
mouse\MouseAndPixel.vcxproj.filters | 956 | 2017-06-19 |