Funktionsreferenz

_GUICtrlComboBoxEx_CreateSolidBitMap

Erstellt ein vollfarbiges Farbbitmap.

#Include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_CreateSolidBitMap($hWnd, $iColor, $iWidth, $iHeight)

 

Parameter

$hWnd Handle zu dem Fenster wo das Bitmap dargestellt werden soll
$iColor Die Farbe des Bitmaps in RGB
$iWidth Die Breite des Bitmaps
$iHeight Die Höhe des Bitmaps

 

Rückgabewert

Erfolg: Handle des Bitmaps

 

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

 

Verwandte Funktionen

 

Beispiel


#include <GuiComboBoxEx.au3>
#include <GuiImageList.au3>
#include <GuiConstantsEx.au3>

Opt('MustDeclareVars', 1)

$Debug_CB = False ; Prüft den Klassennamen (ClassName), der an die ComboBox/ComboBoxEx-Funktion übergeben wird. Setze dies versuchsweise auf True und verwende dann ein Handle zu einem anderen Control, um die Funktionsweise zu verstehen.

_Main()

Func _Main()
    Local $hGUI, $hImage, $hCombo

    ; Erstellt eine GUI
    $hGUI = GUICreate("ComboBoxEx: Erstellt ein vollfarbiges Farbbitmap", 450, 300)
    $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100)
    GUISetState()

    $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 : Zufallstring", Random(1, 200, 1)), $x, $x)
    Next

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main