1. Win32lib - resize client

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

new topic     » topic index » view message » categorize

2. Re: Win32lib - resize client

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
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu