Function Reference


_GUICtrlHeader_SetHotDivider

Changes the hot divider color

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

Parameters

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

Remarks

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.

Example

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

Example()

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

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

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

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