| View previous topic :: View next topic |
| Author |
Message |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Sun Jun 21, 2009 10:55 pm Post subject: Child window resizing. |
|
|
Using Win32 API only, how do I make it so the child windows resize along with the parent?
For example, without this functionality, this happens.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Mon Jun 22, 2009 12:39 am Post subject: |
|
|
Add a WM_SIZE handler and call MoveWindow for the child window from within that handler.
Note that in the WM_SIZE message, HIWORD(lParam) is the new client width and LOWORD(lParam) is the new client height.
_________________
|
|
| Back to top |
|
 |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Mon Jun 22, 2009 5:16 am Post subject: |
|
|
Oops, must have worded my question badly.
I know to handle WM_SIZE and resize/reposition each child window individually, but is there an easier or automated way to do this for all child windows?
|
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Mon Jun 22, 2009 7:08 am Post subject: |
|
|
I guess you could use EnumChildWindows.
_________________
|
|
| Back to top |
|
 |
|