从语言 ID 中提取主语言 ID
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetLocalePrimLang($hWnd)
$hWnd | 控件句柄 |
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>
$Debug_CB = False ;检查传递给 ComboBox/ComboBoxEx 函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
Local $hGUI, $hCombo
; 创建 GUI
$hGUI = GUICreate("ComboBoxEx Get Locale Country Primary Language id", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100)
GUISetState()
; 添加文件
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES, False)
; 显示区域, 国家代码, 语言标识符, 主要语言标识符和子语言标识符
MsgBox(4160, "信息", _
"Locale .................: " & _GUICtrlComboBoxEx_GetLocale($hCombo) & @LF & _
"Country code ........: " & _GUICtrlComboBoxEx_GetLocaleCountry($hCombo) & @LF & _
"Language identifier..: " & _GUICtrlComboBoxEx_GetLocaleLang($hCombo) & @LF & _
"Primary Language id : " & _GUICtrlComboBoxEx_GetLocalePrimLang($hCombo) & @LF & _
"Sub-Language id ....: " & _GUICtrlComboBoxEx_GetLocaleSubLang($hCombo))
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main