Définit les styles avancés d'un contrôle ComboBoxEx
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_SetExtendedStyle ( $hWnd, $iExStyle [, $iExMask = 0] )
$hWnd | Handle du contrôle |
$iExStyle | Styles avancés du contrôle: $CBES_EX_CASESENSITIVE - les recherches dans la liste seront sensible à la casse $CBES_EX_NOEDITIMAGE - La zone d'édition et la liste déroulante n'afficheront pas les images d'élément $CBES_EX_NOEDITIMAGEINDENT - La zone d'édition et la liste déroulante n'afficheront pas les images d'élément $CBES_EX_NOSIZELIMIT - Permet au contrôle ComboBoxEx d'être dimensionné verticalement plus petit que son contrôle combo box qu'elle contient |
$iExMask | [optionnel] Spécifie quels styles de $iExStyle doivent être affectée. Ce paramètre peut être une combinaison de styles avancés. Seuls les styles avancés dans $iExMask seront changés. Tous les autres styles seront maintenus tels quels. Si ce paramètre est égal à zéro, tous les styles de $iExStyle seront affectés. |
_GUICtrlComboBoxEx_GetExtendedStyle
#include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $hImage, $hCombo ; Crée une GUI $hGUI = GUICreate("ComboBoxEx Set Extended Style", 400, 300) $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100) ; Définit les styles avancés _GUICtrlComboBoxEx_SetExtendedStyle($hCombo, $CBES_EX_CASESENSITIVE) GUISetState(@SW_SHOW) $hImage = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 110) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 131) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 165) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 168) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 137) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 146) _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 8 _GUICtrlComboBoxEx_AddString($hCombo, StringFormat("%03d : Random string", Random(1, 100, 1)), $x, $x) Next ; Obtient les styles avancés MsgBox($MB_SYSTEMMODAL, "Information", "Extend Styles found: " & _DisplayExtendStringList($hCombo)) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE EndFunc ;==>Example Func _DisplayExtendStringList($hCombo) Local $sStyles = @CRLF & @CRLF & @TAB If (BitAND(_GUICtrlComboBoxEx_GetExtendedStyle($hCombo), $CBES_EX_CASESENSITIVE) = $CBES_EX_CASESENSITIVE) Then $sStyles &= "$CBES_EX_CASESENSITIVE" & @CRLF & @TAB If (BitAND(_GUICtrlComboBoxEx_GetExtendedStyle($hCombo), $CBES_EX_NOEDITIMAGE) = $CBES_EX_NOEDITIMAGE) Then $sStyles &= "$CBES_EX_NOEDITIMAGE" & @CRLF & @TAB If (BitAND(_GUICtrlComboBoxEx_GetExtendedStyle($hCombo), $CBES_EX_NOEDITIMAGEINDENT) = $CBES_EX_NOEDITIMAGEINDENT) Then $sStyles &= "$CBES_EX_NOEDITIMAGEINDENT" & @CRLF & @TAB If (BitAND(_GUICtrlComboBoxEx_GetExtendedStyle($hCombo), $CBES_EX_NOSIZELIMIT) = $CBES_EX_NOSIZELIMIT) Then $sStyles &= "$CBES_EX_NOSIZELIMIT" & @CRLF & @TAB ; If (BitAND(_GUICtrlComboBoxEx_GetExtendedStyle ($hCombo), $CBES_EX_PATHWORDBREAKPROC) = $CBES_EX_PATHWORDBREAKPROC) Then $sStyles &= "$CBES_EX_PATHWORDBREAKPROC" Return $sStyles EndFunc ;==>_DisplayExtendStringList