Function Reference


_GUICtrlListView_CreateSolidBitMap

Creates a solid color bitmap

#include <GuiListView.au3>
_GUICtrlListView_CreateSolidBitMap ( $hWnd, $iColor, $iWidth, $iHeight )

Parameters

$hWnd Control ID/Handle to the control
$iColor The color of the bitmap, stated in RGB
$iWidth The width of the bitmap
$iHeight The height of the bitmap

Return Value

Returns an handle to the bitmap.

Example

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

Example()

Func Example()
        Local $hImage, $idListview

        GUICreate("ListView Create Solid BitMap", 400, 300)
        $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
        GUISetState(@SW_SHOW)

        ; Load images
        $hImage = _GUIImageList_Create()
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0xFF0000, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0x00FF00, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap(GUICtrlGetHandle($idListview), 0x0000FF, 16, 16))
        _GUICtrlListView_SetImageList($idListview, $hImage, 1)

        ; Add columns
        _GUICtrlListView_AddColumn($idListview, "Items", 100)

        ; Add items
        _GUICtrlListView_AddItem($idListview, "Item 1", 0)
        _GUICtrlListView_AddItem($idListview, "Item 2", 1)
        _GUICtrlListView_AddItem($idListview, "Item 3", 2)

        ; Indent items
        _GUICtrlListView_SetItemIndent($idListview, 1, 1)
        _GUICtrlListView_SetItemIndent($idListview, 2, 2)

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