UDF > GUI > GuiComboBoxEx >


_GUICtrlComboBoxEx_SetUnicode

Définit si le contrôle utilise l'Unicode

#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_SetUnicode ( $hWnd [, $bUnicode = True] )

Paramètres

$hWnd Handle du contrôle
$bUnicode [optionnel] Peut être l'une des valeurs suivantes:
    True - Active l'Unicode
    False - Désactive l'Unicode

Valeur de retour

Succès: Retourne True.
Échec: Retourne False.

En relation

_GUICtrlComboBoxEx_GetUnicode

Exemple

#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $hGUI, $hCombo

    ; Crée une GUI
    $hGUI = GUICreate("ComboBoxEx Get/Set Unicode", 400, 300)
    $hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100, $CBS_SIMPLE)
    GUISetState(@SW_SHOW)

    _GUICtrlComboBoxEx_InitStorage($hCombo, 150, 300)
    _GUICtrlComboBoxEx_BeginUpdate($hCombo)

    For $x = 0 To 149
        _GUICtrlComboBoxEx_AddString($hCombo, StringFormat("%03d : Random string", Random(1, 100, 1)))
    Next
    _GUICtrlComboBoxEx_EndUpdate($hCombo)

    ; Set/Get Unicode
    MsgBox($MB_SYSTEMMODAL, "Information", "Set Unicode: " & _GUICtrlComboBoxEx_SetUnicode($hCombo, False))
    MsgBox($MB_SYSTEMMODAL, "Information", "Get Unicode: " & _GUICtrlComboBoxEx_GetUnicode($hCombo))

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