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

Windows size and Screen size

This topic is 5010 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 was wondering if someone can tell me how to find the actual size of the of the client area of a window using opengl. I set the window size to 800X600 but when i use the mouse to capture the coordinates it becomes 791x553. Is there a formula I must use to figure it out. I do have a menu bar that is taking away from some of the height though. Thanks

Share this post

Link to post
Share on other sites

assuming you're using windows of course. Unless I've gotten my functions twisted, GetWindowRect is the size of the window, GetClientRect gets the size of the window you can actually draw on.

[edit] figured I'd be more helpful and show usage too:
RECT clientRect;

-Arek the Absolute

[edited by - Arek the Absolute on March 29, 2004 9:02:47 PM]

Share this post

Link to post
Share on other sites