Function Reference


_GUICtrlStatusBar_GetTextFlags

Retrieves the text length flags for a part

#include <GuiStatusBar.au3>
_GUICtrlStatusBar_GetTextFlags ( $hWnd, $iPart )

Parameters

$hWnd Handle to the control
$iPart 0-based part index

Return Value

Returns the low word specifies the length, in characters, of the text. The high word specifies the type of operation used to draw the text. The type can be one of the following values:
    0 - The text is drawn with a border to appear lower than the plane of the window
    $SBT_NOBORDERS - The text is drawn without borders
    $SBT_OWNERDRAW - The text is drawn by the parent window
    $SBT_POPOUT - The text is drawn with a border to appear higher than the plane of the window
    $SBT_RTLREADING - The text will be displayed in the opposite direction to the text in the parent window

Related

_GUICtrlStatusBar_GetTextLength, _GUICtrlStatusBar_GetTextLengthEx

Example

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

Global $g_idMemo

Example()

Func Example()
        ; Create GUI
        Local $hGUI = GUICreate("StatusBar Get Text Flags (v" & @AutoItVersion & ")", 400, 300)
        Local $hStatus = _GUICtrlStatusBar_Create($hGUI)

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

        ; Set parts
        Local $aParts[3] = [75, 150, -1]
        _GUICtrlStatusBar_SetParts($hStatus, $aParts)
        _GUICtrlStatusBar_SetText($hStatus, "Part 0", 0, $SBT_POPOUT)
        _GUICtrlStatusBar_SetText($hStatus, "Part 1", 1, $SBT_NOBORDERS)
        _GUICtrlStatusBar_SetText($hStatus, "Part 2", 2, $SBT_NOTABPARSING)

        ; Get text information
        For $iI = 0 To _GUICtrlStatusBar_GetCount($hStatus) - 1
                MemoWrite("Part " & $iI & " text flags ..: 0x" & Hex(_GUICtrlStatusBar_GetTextFlags($hStatus, $iI)))
                MemoWrite("Part " & $iI & " text length .: " & _GUICtrlStatusBar_GetTextLength($hStatus, $iI))
                MemoWrite("Part " & $iI & " drawing type : 0x" & Hex(_GUICtrlStatusBar_GetTextLengthEx($hStatus, $iI)))
                MemoWrite()
        Next

        ; 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