Mouse coords windows directx

Started by
1 comment, last by beowulf 20 years, 11 months ago
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?
Advertisement
RECT ClientRect;
GetClientRect( &ClientRect );

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

Thanks m8!

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

This topic is closed to new replies.

Advertisement