Sets extended styles within a ComboBoxEx control
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_SetExtendedStyle ( $hWnd, $iExStyle [, $iExMask = 0] )
$hWnd | Handle to the control |
$iExStyle | Extended control styles: $CBES_EX_CASESENSITIVE - Searches in the list will be case sensitive $CBES_EX_NOEDITIMAGE - The edit box and the dropdown list will not display item images $CBES_EX_NOEDITIMAGEINDENT - The edit box and the dropdown list will not display item images $CBES_EX_NOSIZELIMIT - Allows the ComboBoxEx control to be vertically sized smaller than its contained combo box control |
$iExMask | [optional] Specifies which styles in $iExStyle are to be affected. This parameter can be a combination of extended styles. Only the extended styles in $iExMask will be changed. All other styles will be maintained as they are. If this parameter is zero, all of the styles in $iExStyle will be affected. |
_GUICtrlComboBoxEx_GetExtendedStyle
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create GUI
Local $hGUI = GUICreate("ComboBoxEx Get/Set Extended Style (v" & @AutoItVersion & ")", 420, 300)
Local $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 414, 100)
;Set Extended Style
_GUICtrlComboBoxEx_SetExtendedStyle($hCombo, $CBES_EX_CASESENSITIVE)
GUISetState(@SW_SHOW)
Local $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 : string", $x), $x, $x)
Next
;Get Extended Style
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