Reshaping a window along with it's subwindows

Started by
0 comments, last by Endurion 15 years, 3 months ago
Hi i am a novice and using opengl with glut.. smne plz tell me how can i reshape a window along with its subwindows...so that each dispay on the scrren (including those visible in the subwindows) are changed proportionatly....
Advertisement
Unfortunately this is something you need to do yourself (unless you use some advanced GUI framework). The advanced GUI frameworks usually let you pin the sides of the window to the borders. What you want to do sounds like proportionally size the controls.

It boils down to:

1)
On startup remember all the control positions and sizes

2)
On the size event (WM_SIZE), glut probably offers a callback use the given new size to calculate the new positions and sizes. You might want to use BeginDeferWindowPos and EndDeferWindowPos around SetWindowPos if the number of controls is not a small number to keep flickering down.
Use the remembered sizes for the calculation, otherwise rounding errors will creep in.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement