Function Reference


_GUICtrlListView_GetCallbackMask

Retrieves the callback mask for the control

#include <GuiListView.au3>
_GUICtrlListView_GetCallbackMask ( $hWnd )

Parameters

$hWnd Handle to the control

Return Value

Returns an Value of the callback mask. The bits of the mask indicate the item states or images for which the application stores the current state data. This value can be any combination of the following:
1 - The item is marked for a cut-and-paste operation
2 - The item is highlighted as a drag-and-drop target
4 - The item has the focus
8 - The item is selected
16 - The application stores the image list index of the current overlay image
32 - The application stores the image list index of the current state image

Remarks

The callback mask is a set of bit flags that specify the item states for which the application, rather than the control, stores the current data.

The callback mask applies to all of the control's items, unlike the callback item designation, which applies to a specific item.
The callback mask is zero by default, meaning that the control stores all item state information.

Related

_GUICtrlListView_SetCallBackMask

Example

#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>

Example_UDF_Created()

Func Example_UDF_Created()
    Local $hGUI, $hImage, $hListView

    $hGUI = GUICreate("(UDF Created) ListView Get CallBack Mask", 400, 300)

    $hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 394, 268)
    GUISetState(@SW_SHOW)

    _GUICtrlListView_SetCallBackMask($hListView, 32)
    MsgBox($MB_SYSTEMMODAL, "Information", "CallBackMask: " & _GUICtrlListView_GetCallbackMask($hListView))

    ; Load images
    $hImage = _GUIImageList_Create()
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xC0C0C0, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF00FF, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFFFF00, 16, 16))
    _GUICtrlListView_SetImageList($hListView, $hImage, 1)
    _GUICtrlListView_SetImageList($hListView, $hImage, 2)

    ; Add columns
    _GUICtrlListView_AddColumn($hListView, "Column 1", 100)
    _GUICtrlListView_AddColumn($hListView, "Column 2", 100)
    _GUICtrlListView_AddColumn($hListView, "Column 3", 100)

    ; Add items with callback for item text
    _GUICtrlListView_AddItem($hListView, -1, 0)
    _GUICtrlListView_AddItem($hListView, -1, 1)
    _GUICtrlListView_AddItem($hListView, -1, 2)

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