Function Reference


_GUICtrlStatusBar_Resize

Causes the status bar to resize itself

#include <GuiStatusBar.au3>
_GUICtrlStatusBar_Resize ( $hWnd )

Parameters

$hWnd Handle to the control

Return Value

None.

Example

#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>

Global $g_hStatus

Example()

Func Example()
    Local $hGUI
    Local $aParts[3] = [75, 150, -1]

    ; Create GUI
    $hGUI = GUICreate("StatusBar Resize", 400, 300, -1, -1, $WS_OVERLAPPEDWINDOW)

    $g_hStatus = _GUICtrlStatusBar_Create($hGUI)
    _GUICtrlStatusBar_SetParts($g_hStatus, $aParts)
    GUISetState(@SW_SHOW)

    GUIRegisterMsg($WM_SIZE, "WM_SIZE")

    ; Loop until the user exits.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example

; Resize the status bar when GUI size changes
Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam, $lParam
    _GUICtrlStatusBar_Resize($g_hStatus)
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SIZE