Skip to main content
GameDev.net gamedev.net
🔒 Locked

winapi stuff

Started by ehmdjii Apr 10, 2005 at 8:46 AM 1 replies 900+ views
Original Post
ehmdjii
ehmdjii
hello, i use good ol winapi to create a window with an opengl context inside. there are two things that bug me: 1. i also add a menu to the window, but this shifts the opengl drawing area down by the height of the menu. this makes my mousepicking not inaccurate. 2. when i move or resize the window, all the drawing is on hold. now i 've seen other applications where the drawing continues also while the window is moved or resized. anyone knows how to solve these two problems? thanks!
Evil Steve
Evil Steve
Quote:
Original post by ehmdjii
1. i also add a menu to the window, but this shifts the opengl drawing area down by the height of the menu. this makes my mousepicking not inaccurate.
You want to make your client area the same size as the drawing area. So if you want a 640x480 drawing area, your actual window size might be 644x500. You can use the AdjustWindowRect function to get the window size from the client area (drawing area) size, which you then pass to CreateWindow.

Quote:
Original post by ehmdjii
2. when i move or resize the window, all the drawing is on hold. now i 've seen other applications where the drawing continues also while the window is moved or resized.
In your message proc, look for WM_MOVING or WM_SIZING, and call your Render code from there.
ehmdjii
ehmdjii
problems solved.

thank you!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.