Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Система";
Текущий архив: 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
3-51107
AndrewK
2003-09-25 13:00
2003.10.16
Порядковый номер строки в SQL запросе


1-51267
kaif
2003-09-30 00:25
2003.10.16
SelectDirectory + CreateDirButton


7-51531
Dark Elf
2003-08-03 16:33
2003.10.16
Программирование порта COM1 в Delphi


1-51276
Alex21
2003-09-27 07:43
2003.10.16
Расчипление строки


1-51340
Fast
2003-10-05 22:30
2003.10.16
Получить список всех кнопок на форме





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский