mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
win32 interface: improved wm_char handling
git-svn-id: trunk@14770 -
This commit is contained in:
parent
7b3bf328ae
commit
95e234bd6e
@ -1216,6 +1216,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
WM_CHAR:
|
WM_CHAR:
|
||||||
begin
|
begin
|
||||||
|
{$ifdef WindowsUnicodeSupport}
|
||||||
// first send a IntfUTF8KeyPress to the LCL
|
// first send a IntfUTF8KeyPress to the LCL
|
||||||
// if the key was not handled send a CN_CHAR for AnsiChar<=#127
|
// if the key was not handled send a CN_CHAR for AnsiChar<=#127
|
||||||
if not HandleUnicodeChar(Word(WParam)) and (WParam<=127) then
|
if not HandleUnicodeChar(Word(WParam)) and (WParam<=127) then
|
||||||
@ -1229,9 +1230,25 @@ begin
|
|||||||
Result := 0;
|
Result := 0;
|
||||||
Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
WinProcess := false;
|
WinProcess := false;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
WinProcess := true;
|
||||||
|
|
||||||
|
{$else}
|
||||||
|
// first send a IntfUTF8KeyPress to the LCL
|
||||||
|
// if the key was not handled send a CN_CHAR for AnsiChar<=#127
|
||||||
|
PLMsg:=@LMChar;
|
||||||
|
with LMChar do
|
||||||
|
begin
|
||||||
|
Msg := CN_CHAR;
|
||||||
|
KeyData := LParam;
|
||||||
|
CharCode := Word(WParam);
|
||||||
|
Result := 0;
|
||||||
|
Assert(False,Format('WM_CHAR KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
||||||
|
end;
|
||||||
|
WinProcess := false;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WM_MENUCHAR:
|
WM_MENUCHAR:
|
||||||
|
@ -386,7 +386,11 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TWin32WidgetSet.IntfSendsUTF8KeyPress: boolean;
|
function TWin32WidgetSet.IntfSendsUTF8KeyPress: boolean;
|
||||||
begin
|
begin
|
||||||
Result := UnicodeEnabledOS;
|
{$ifdef WindowsUnicodeSupport}
|
||||||
|
Result := true;
|
||||||
|
{$else}
|
||||||
|
Result := false;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WidgetSet.LoadStockPixmap(StockID: longint; var Mask: HBitmap): HBitmap;
|
function TWin32WidgetSet.LoadStockPixmap(StockID: longint; var Mask: HBitmap): HBitmap;
|
||||||
|
Loading…
Reference in New Issue
Block a user