Creates a solid color bitmap
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_CreateSolidBitMap ( $hWnd, $iColor, $iWidth, $iHeight )
$hWnd | Handle to the window where the bitmap will be displayed |
$iColor | The color of the bitmap, stated in RGB |
$iWidth | The width of the bitmap |
$iHeight | The height of the bitmap |
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
Example()
Func Example()
Local $hGUI, $hImage, $hCombo
; Create GUI
$hGUI = GUICreate("ComboBoxEx Create Solid BitMap", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100)
GUISetState(@SW_SHOW)
$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_Add($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap($hCombo, 0xFF0000, 16, 16))
_GUIImageList_Add($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap($hCombo, 0x00FF00, 16, 16))
_GUIImageList_Add($hImage, _GUICtrlComboBoxEx_CreateSolidBitMap($hCombo, 0x0000FF, 16, 16))
_GUICtrlComboBoxEx_SetImageList($hCombo, $hImage)
For $x = 0 To 2
_GUICtrlComboBoxEx_AddString($hCombo, StringFormat("%03d : Random string", Random(1, 200, 1)), $x, $x)
Next
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example