Bestimmt das korrekte Gebietsschema
#include <GuiListBox.au3>
_GUICtrlListBox_SetLocale ( $hWnd, $iLocal )
$hWnd | Control-ID / Handle des Controls |
$iLocal | Spezifiziert das Gebietsschema, das die ListBox benutzt, wenn eingegebener Text sortiert werden soll. |
Erfolg: | Das bisherige Gebietsschema |
Fehler: | -1 |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Erstellt eine GUI
GUICreate("ListBox: Setzt und ermittelt das Gebietsschema (v" & @AutoItVersion & ")", 500, 296)
Local $idListBox = GUICtrlCreateList("", 2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Zeigt die Gebietsschema-Einstellung, den Ländercode und die Sprach-Identifizierer an
MsgBox($MB_SYSTEMMODAL, "Information", _
"Gebietsschema ...: " & _GUICtrlListBox_GetLocale($idListBox) & @CRLF & _
"Ländercode ......: " & _GUICtrlListBox_GetLocaleCountry($idListBox) & @CRLF & _
"Sprach-ID........: " & _GUICtrlListBox_GetLocaleLang($idListBox) & @CRLF & _
"Primäre Sprach-ID: " & _GUICtrlListBox_GetLocalePrimLang($idListBox) & @CRLF & _
"Sub-Sprach-ID ...: " & _GUICtrlListBox_GetLocaleSubLang($idListBox))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example
#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIConv.au3>
#include <WinAPILangConstants.au3>
Example()
Func Example()
; Erstellt eine GUI
GUICreate("ListBox: Setzt und ermittelt das Gebietsschema (v" & @AutoItVersion & ")", 500, 296)
Local $idListBox = GUICtrlCreateList("", 2, 2, 396, 296)
GUISetState(@SW_SHOW)
Local $iLocale = _WinAPI_MAKELCID(_WinAPI_MAKELANGID($LANG_DUTCH, $SUBLANG_DUTCH), $SORT_DEFAULT)
MsgBox($MB_SYSTEMMODAL, "Information", "bisheriges Gebietsschema: " & _GUICtrlListBox_SetLocale($idListBox, $iLocale))
$iLocale = _WinAPI_MAKELCID(_WinAPI_MAKELANGID($LANG_ENGLISH, $SUBLANG_ENGLISH_US), $SORT_DEFAULT)
MsgBox($MB_SYSTEMMODAL, "Information", "bisheriges Gebietsschema: " & _GUICtrlListBox_SetLocale($idListBox, $iLocale))
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example