コントロールのコールバックマスクを変更します。
#Include <GuiListView.au3>
_GUICtrlListView_SetCallBackMask($hWnd, $iMask)
パラメータ
$hWnd | コントロールのハンドル |
$iMask | 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 |
返し値
成功: | True |
失敗: | False |
注意
The callback mask is a set of bit flags that specify the item states for which the application, rather than
関連
_GUICtrlListView_GetCallbackMask
例
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
Opt('MustDeclareVars', 1)
$Debug_LV = False ; ListView関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用
Example_UDF_Created()
Func Example_UDF_Created()
Local $GUI, $hImage, $hListView
$GUI = GUICreate("(UDF Created) ListView Set CallBack Mask", 400, 300)
$hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268)
GUISetState()
_GUICtrlListView_SetCallBackMask($hListView, 32)
MsgBox(4160, "Information", "CallBackMask: " & _GUICtrlListView_GetCallbackMask($hListView))
; 画像をロード
$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)
; 列を追加
_GUICtrlListView_AddColumn($hListView, "Column 1", 100)
_GUICtrlListView_AddColumn($hListView, "Column 2", 100)
_GUICtrlListView_AddColumn($hListView, "Column 3", 100)
; アイテムテキストのコールバックを持つアイテムを追加
_GUICtrlListView_AddItem($hListView, -1, 0)
_GUICtrlListView_AddItem($hListView, -1, 1)
_GUICtrlListView_AddItem($hListView, -1, 2)
; ユーザーが終了するまでループ
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example_UDF_Created