设置控件是否使用Unicode
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_SetUnicode($hWnd [, $fUnicode = True])
$hWnd | 控件句柄 |
$fUnicode | [可选参数] 可以是下列值之一: True - 启用 Unicode False - 禁用 Unicode |
成功: | 返回 True |
失败: | 返回 False |
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
$Debug_CB = False ;检查传递给 ComboBox/ComboBoxEx 函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
Local $hGUI, $hCombo
; 创建 GUI
$hGUI = GUICreate("ComboBoxEx Get/Set Unicode", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100, $CBS_SIMPLE)
GUISetState()
_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)
;设置/获取 Unicode
MsgBox(4160, "信息", "Set Unicode: " & _GUICtrlComboBoxEx_SetUnicode($hCombo, False))
MsgBox(4160, "信息", "Get Unicode: " & _GUICtrlComboBoxEx_GetUnicode($hCombo))
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main