Funktionreferenz


_GUICtrlListBox_GetLocale

Beschreibung anzeigen in

Ermittelt das aktuelle Gebietsschema

#include <GuiListBox.au3>
_GUICtrlListBox_GetLocale ( $hWnd )

Parameter

$hWnd Control-ID / Handle des Controls

Rückgabewert

Gibt die höhere Zahl die den Ländercode enthält und die niedrigere Zahl die den Sprachcode enthält zurück.

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

Verwandte Funktionen

_GUICtrlListBox_GetLocaleCountry, _GUICtrlListBox_GetLocaleLang, _GUICtrlListBox_GetLocalePrimLang, _GUICtrlListBox_GetLocaleSubLang, _GUICtrlListBox_SetLocale

Beispiel

Beispiel 1

#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

Beispiel 2

#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