• Advertisement

Archived

This topic is now archived and is closed to further replies.

Mouse coords windows directx

This topic is 5379 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

Hi, I''m working on a little windowed Direct3D game. Mouse input is done through simple windows messages (no directinput). So Ie. I''ed respond to a WM_LBUTTONUP message. My problem is that the x,y coords that I get with the WM_LBUTTONUP message dont appear to be accurate. Is this because they are relative to the upper-upper left corner of the window (including menubar) rather than upper left client area of window (which is the upper left of my direct3ddevice?)? They have to be accurate before my intercepting test can return accurate results. How do I get the client x,y? SOme specific numbers I should add/substract?

Share this post


Link to post
Share on other sites
Advertisement
RECT ClientRect;
GetClientRect( &ClientRect );

That should get you started It returns the non menu/title bar area of window.

Share this post


Link to post
Share on other sites
Thanks m8!

I''ll look that up in Win32 help, been searching for something like that :-)

Share this post


Link to post
Share on other sites

  • Advertisement