Sign in to follow this  

Getting the window's workspace size

This topic is 3743 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 everyone I'm having a little problem right now. I have set up a simple D3D app, which shows a rectangle that's following my mouse. The only problem is that it isn't shown on the exact cursor position. When i place my cursor near to (0,0) of the client rectangle the rectangle is placed correctly, but when moving to lower-right corner, the rectangle is not placed correctly. I think this has to do with the size of my frame-buffer. I set it exaclty to the window size. I guess this is not correct because that size also takes the window borders and title bar into account. The actual work space is smaller, so the framebuffer is cropped into that space. That's why my rect isn't showing up at the right position. I want the framebuffer to match pixel-perfectly with the window itself. I'm writing a small 2D engine and all sprites have 2d coordinates which should match the pixels of the window. Does anyone know a way of determining the actual workspace size with WinAPI?? Thanx a bunch!!!

Share this post


Link to post
Share on other sites

This topic is 3743 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this