Advertisement

GetClientRect() -> Screen coordinates

Started by September 29, 2000 02:56 PM
0 comments, last by Cygon 24 years, 3 months ago
As the subject says, I''d like to convert the coordinates of GetClientRect() into screen coordinates to find out wether the mouse is inside the client rect of the window. I know of GetWindowRect() and GetWindowRgn(), but these return the outline of the entire window (including title, menu and borders). What I''m trying to do is hiding the mouse cursor in my WindowProc() when it is inside the client area of the window but showing it when it is on the title/menu/border. -Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
ClientToScreen will convert a POINT in client coordinates to screen coordinates. MapWindowPoints will convert multiple POINTs from cooridinates in one window to coordinates in another.

Use MapWindowPoints, use NULL for the "to" window to convert to screen coordinates, and say 2 points (to get the whole RECT).

-Mike

This topic is closed to new replies.

Advertisement