Как узнать текущую раскладку клавиатуры?
На Delphi такой код работает:
if GetKeyboardLayout(GetWindowThreadProcessId(GetForegroundWindow, nil)) = 67699721 then
//раскладка английская
begin
Label1.Caption:='Hello, world!';
end
else
//раскладка Не английская, например 68748313 соответствует русской
begin
Label1.Caption:='Привет, Мир!';
end;
А Lazarus ругается. Говорит:
Error: Identifier not found "GetKeyboardLayout"
Error: Identifier not found "GetWindowThreadProcessId"
Error: Identifier not found "GetForegroundWindow"