Function Reference


_GUICtrlStatusBar_GetBordersHorz

Retrieves the current width of the horizontal border

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

Parameters

$hWnd Handle to the control

Return Value

Success: the width of the horizontal border.
Failure: sets the @error flag to non-zero.

Related

_GUICtrlStatusBar_GetBorders, _GUICtrlStatusBar_GetBordersRect, _GUICtrlStatusBar_GetBordersVert

Example

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

Global $g_idMemo

Example()

Func Example()
        ; Create GUI
        Local $hGUI = GUICreate("StatusBar Get Borders Horizontal (v" & @AutoItVersion & ")", 400, 300)

        Local $hStatus = _GUICtrlStatusBar_Create($hGUI)
        Local $aParts[3] = [75, 150, -1]
        _GUICtrlStatusBar_SetParts($hStatus, $aParts)

        ; Create memo control
        $g_idMemo = GUICtrlCreateEdit("", 2, 2, 396, 274, $WS_VSCROLL)
        GUICtrlSetFont($g_idMemo, 9, 400, 0, "Courier New")
        GUISetState(@SW_SHOW)

        ; Get border sizes
        MemoWrite("Horizontal border width .: " & _GUICtrlStatusBar_GetBordersHorz($hStatus))
        MemoWrite("Vertical border width ...: " & _GUICtrlStatusBar_GetBordersVert($hStatus))
        MemoWrite("Width between rectangles : " & _GUICtrlStatusBar_GetBordersRect($hStatus))

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

; Write message to memo
Func MemoWrite($sMessage = "")
        GUICtrlSetData($g_idMemo, $sMessage & @CRLF, 1)
EndFunc   ;==>MemoWrite