Форум: "Система";
Текущий архив: 2003.10.16;
Скачать: [xml.tar.bz2];
Вниз!!!! GetKeyboardLayoutName, GetKeyboardLayout !!!! Найти похожие ветки
← →
Oleg (2003-07-25 11:35) [0]Объясните плз как пользоваться этими функциями, желательно маленький примерчик, особенно хотелось бы узнать про параметры, т.к. у меня в хелпе этих функций почему-то не оказалось!
← →
mrcat (2003-07-25 11:38) [1]Нет хэлпа? Не беда! :)
-----------------------
GetKeyboardLayoutName
The GetKeyboardLayoutName function retrieves the name of the active input locale identifier (formerly called the keyboard layout).
BOOL GetKeyboardLayoutName(
LPTSTR pwszKLID ( of at least KL_NAMELENGTH characters in length) Нет хэлпа? Не беда! :)
-----------------------
GetKeyboardLayoutName
The GetKeyboardLayoutName function retrieves the name of the active input locale identifier (formerly called the keyboard layout).
BOOL GetKeyboardLayoutName(
LPTSTR pwszKLID // input locale identifier name
);
Parameters
pwszKLID
[out] Pointer to the buffer (of at least KL_NAMELENGTH characters in length) that receives the name of the input locale identifier, including the NULL terminator. This will be a copy of the string provided to the LoadKeyboardLayout function, unless layout substitution took place.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
-----------------------
GetKeyboardLayout
The GetKeyboardLayout function retrieves the active input locale identifier (formerly called the keyboard layout) for a specified thread. If the idThread parameter is zero, the input locale identifier for the active thread is returned.
HKL GetKeyboardLayout(
DWORD idThread // thread identifier
);
Parameters
idThread
[in] Identifies the thread to query or is zero for the current thread.
Return Values
The return value is the input locale identifier for the thread. The low word contains a language identifier for the input language and the high word contains a device handle for the physical layout of the keyboard.
← →
Oleg (2003-07-25 11:59) [2]А маленький примерчик? :)
← →
AbrosimovA (2003-07-25 12:05) [3]
procedure *****************************
var s: array [0..8] of char;
begin
GetKeyboardLayoutName(s);
if s="00000419" then StatusBar1.Panels[0].Text:= "RU";
if s="00000409" then StatusBar1.Panels[0].Text:= "EN";
end;
← →
VMcL (2003-07-25 15:20) [4]>Oleg (25.07.03 11:59)
>AbrosimovA © (25.07.03 12:05)
function GetLayoutShortName: String;
var
LayoutName: array [0 .. KL_NAMELENGTH + 1] of Char;
LangName: array [0 .. 1024] of Char;
begin
Result := "??";
if GetKeyboardLayoutName(@LayoutName) then
begin
if GetLocaleInfo(StrToInt("$" + StrPas(LayoutName)),
LOCALE_SABBREVLANGNAME,
@LangName, SizeOf(LangName) - 1) <> 0
then
Result := StrPas(LangName);
end;
Result := AnsiUpperCase(Copy(Result, 1, 2));
end;
← →
Oleg (2003-07-28 05:38) [5]Большое спасибо всем за информацию! :)
← →
VKSam (2003-08-02 12:32) [6]Удалено модератором
Примечание: Задай свой вопрос в отдельной ветке
Страницы: 1 вся ветка
Форум: "Система";
Текущий архив: 2003.10.16;
Скачать: [xml.tar.bz2];
Память: 0.46 MB
Время: 0.011 c