Jump to content
  • Advertisement
Sign in to follow this  
guyaton

getting Exact Screen Coordinates

This topic is 4950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to get the coordinates of the mouse inside my window: currently I have this: POINT pt; GetCursorPos(&pt); ScreenToClient( m_hwnd, &pt); but the only problem is that this seems to include the boarder of the window. Is there a function that can remove the boarder and give me the coordinates only while it is inside the window "box" if thats what its called? thanks,

Share this post


Link to post
Share on other sites
Advertisement
Do some research on the AdjustWindowRect() API function. I think I remenber myself using that for a similar purpose sometime, but I don't remember exactly how it works...

Best of luck

Share this post


Link to post
Share on other sites
I'd try using GetClientRect, just to get the RECT to the client area of the window only... But, you'll have to try it...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!