Function _GUICtrlHeader_SetHotDivider

Function Reference


Changes the hot divider color

#include <GuiHeader.au3>
_GUICtrlHeader_SetHotDivider ( $hWnd, $iFlag, $iInputValue )


$hWnd Handle to the control
$iFlag Value specifying the type of value represented by $iInputValue.
This value can be one of the following:
    True - Indicates that $iInputValue holds the client coordinates of the pointer
    False - Indicates that $iInputValue holds a divider index value
$iInputValue Value interpreted by $iFlag

Return Value

Returns a value equal to the index of the divider that the control highlighted.


This function creates an effect that a header control automatically produces when it has the $HDS_DRAGDROP style.
It is intended to be used when the owner of the control handles drag-and-drop operations manually.


#include <GUIConstantsEx.au3>
#include <GuiHeader.au3>


Func Example()
    Local $hGUI, $hHeader, $iIndex, $hBegin

    ; Create GUI
    $hGUI = GUICreate("Header", 400, 300)
    $hHeader = _GUICtrlHeader_Create($hGUI)
    _GUICtrlHeader_SetUnicodeFormat($hHeader, True)

    ; Add columns
    _GUICtrlHeader_AddItem($hHeader, "Column 1", 100)
    _GUICtrlHeader_AddItem($hHeader, "Column 2", 100)
    _GUICtrlHeader_AddItem($hHeader, "Column 3", 100)
    _GUICtrlHeader_AddItem($hHeader, "Column 4", 100)

    ; Loop until the user exits.
        If TimerDiff($hBegin) > 500 Then
            $iIndex = Mod($iIndex + 1, 4)
            _GUICtrlHeader_SetHotDivider($hHeader, False, $iIndex)
            $hBegin = TimerInit()
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example