mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:39:30 +02:00
win32: implement IME input support for Edit controls. KeyUp (for VK_RETURN) event is supressed if IME composition is finished, bug #16430
git-svn-id: trunk@26984 -
This commit is contained in:
parent
a58662c257
commit
f017af8aaa
@ -1024,6 +1024,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
lWinControl := WindowInfo^.AWinControl;
|
||||
{for ComboBox IME sends WM_IME_NOTIFY with WParam=WM_IME_ENDCOMPOSITION}
|
||||
if (Msg = WM_IME_NOTIFY) and (WPARAM=WM_IME_ENDCOMPOSITION) then
|
||||
begin
|
||||
if Assigned(WindowInfo) then WindowInfo^.IMEComposed:=True;
|
||||
end;
|
||||
|
||||
// filter messages we want to pass on to LCL
|
||||
if (Msg <> WM_KILLFOCUS) and (Msg <> WM_SETFOCUS) and (Msg <> WM_NCDESTROY)
|
||||
and ((Msg < WM_KEYFIRST) or (Msg > WM_KEYLAST))
|
||||
@ -1095,6 +1101,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
WM_IME_ENDCOMPOSITION:
|
||||
begin
|
||||
{IME Windows the composition has finished}
|
||||
if Assigned(WindowInfo) then WindowInfo^.IMEComposed:=True;
|
||||
end;
|
||||
BM_SETCHECK:
|
||||
begin
|
||||
LMessage.Msg := LM_CHANGED;
|
||||
@ -1562,6 +1573,7 @@ begin
|
||||
Assert(False,Format('WM_KEYDOWN KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
||||
Assert(False,' lWinControl= '+TComponent(lWinControl).Name+':'+lWinControl.ClassName);
|
||||
end;
|
||||
if Assigned(WindowInfo) then WindowInfo^.IMEComposed:=False;
|
||||
WinProcess := false;
|
||||
end;
|
||||
WM_KEYUP:
|
||||
@ -1577,6 +1589,7 @@ begin
|
||||
Assert(False,Format('WM_KEYUP KeyData= %d CharCode= %d ',[KeyData,CharCode]));
|
||||
end;
|
||||
WinProcess := false;
|
||||
if Assigned(WindowInfo) and WindowInfo^.IMEComposed then LMKey.Msg:=LM_NULL;
|
||||
end;
|
||||
WM_KILLFOCUS:
|
||||
begin
|
||||
|
@ -65,6 +65,7 @@ Type
|
||||
DispInfoTextA: array [0..LV_DISP_INFO_COUNT-1] of AnsiString; // buffer for ListView LVN_GETDISPINFO notification
|
||||
DispInfoTextW: array [0..LV_DISP_INFO_COUNT-1] of WideString; // it's recommended to keep buffer unchanged
|
||||
DispInfoIndex: Integer; // between 2 calls of LVN_GETDISPINFO
|
||||
IMEComposed: Boolean;
|
||||
case integer of
|
||||
0: (spinValue: Double);
|
||||
1: (
|
||||
|
Loading…
Reference in New Issue
Block a user