1. Win32lib - resize client
- Posted by Mike <vulcan at win.co.nz> Jun 13, 2002
- 449 views
Derek (or other win32lib gurus), If I have a toolbar in a window and I proceed to hide it using setVisible() the client area does not resize. The same goes for using a status bar. Is there some *easy* way to make the client area resize to incorporate the area formerly occupied by the other controls? If there is a solution then it would work in reverse too. When the toolbar/statusbar was un-hidden the client area would then down-size etc.. TIA vulcan at win.co.nz
2. Re: Win32lib - resize client
- Posted by pampeano at rocketmail.com Jun 13, 2002
- 438 views
Hi Mike, This routines should help you on that (from win32.hlp): BOOL GetClientRect( HWND hWnd, // handle of window LPRECT lpRect // address of structure for client coordinates ); BOOL AdjustWindowRect( LPRECT lpRect, // pointer to client-rectangle structure DWORD dwStyle, // window styles BOOL bMenu // menu-present flag ); BOOL AdjustWindowRectEx( LPRECT lpRect, // pointer to client-rectangle structure DWORD dwStyle, // window styles BOOL bMenu, // menu-present flag DWORD dwExStyle // extended style ); Best Regards, Guillermo Bonvehi AKA: Caballero Rojo --- Mike <vulcan at win.co.nz> wrote: > > Derek (or other win32lib gurus), > > If I have a toolbar in a window and I proceed to hide it using > setVisible() the client area does not resize. The same goes for using > a > status bar. Is there some *easy* way to make the client area resize > to > incorporate the area formerly occupied by the other controls? If > there > is a solution then it would work in reverse too. When the > toolbar/statusbar was un-hidden the client area would then down-size > etc.. > > TIA > > vulcan at win.co.nz > > > >