Getting the window's workspace size
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!!!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement