Function Reference


_GUICtrlToolbar_SetAnchorHighlight

Sets the anchor highlight setting

#include <GuiToolbar.au3>
_GUICtrlToolbar_SetAnchorHighlight ( $hWnd, $bAnchor )

Parameters

$hWnd Handle to the control
$bAnchor Anchor highlighting setting:
    True - Anchor highlighting will be enabled
    False - Anchor highlighting will be disabled

Return Value

Returns the previous anchor highlight setting.

Remarks

Anchor highlighting means that the last highlighted item will remain highlighted until another item is highlighted.
This occurs even if the cursor leaves the toolbar control.

Related

_GUICtrlToolbar_GetAnchorHighlight

Example

#include <GuiToolbar.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        Run("explorer.exe /root, ,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}")
        WinWaitActive("My Computer", "", 1)
        Sleep(1000)
        Local $hToolbar = _GUICtrlToolbar_FindToolbar("[CLASS:CabinetWClass]", "&File")
        Local $bEnabled = _GUICtrlToolbar_GetAnchorHighlight($hToolbar)
        MsgBox($MB_SYSTEMMODAL, "Information", "Anchor highlight enabled: " & $bEnabled)
        _GUICtrlToolbar_SetAnchorHighlight($hToolbar, Not $bEnabled)
        MsgBox($MB_SYSTEMMODAL, "Information", "Anchor highlight enabled: " & _GUICtrlToolbar_GetAnchorHighlight($hToolbar))
EndFunc   ;==>Example