fix changing key in OnKeyPress event.

git-svn-id: trunk@6238 -
This commit is contained in:
vincents 2004-11-12 15:33:13 +00:00
parent 94e6f139bd
commit 0f1ee72347

View File

@ -135,7 +135,7 @@ Var
NotifyUserInput: Boolean; NotifyUserInput: Boolean;
OverlayWindow: HWND; OverlayWindow: HWND;
TargetWindow: HWND; TargetWindow: HWND;
DlgCode, CharCode: dword; DlgCode: dword;
eraseBkgndCommand: TEraseBkgndCommand; eraseBkgndCommand: TEraseBkgndCommand;
winClassName: array[0..19] of char; winClassName: array[0..19] of char;
WindowInfo: PWindowInfo; WindowInfo: PWindowInfo;
@ -1191,12 +1191,14 @@ Begin
begin begin
// if key not yet processed, let windows process it // if key not yet processed, let windows process it
WinProcess := LMChar.CharCode <> VK_UNKNOWN; WinProcess := LMChar.CharCode <> VK_UNKNOWN;
WParam := LMChar.CharCode;
end; end;
CN_KEYDOWN, CN_KEYUP: CN_KEYDOWN, CN_KEYUP:
begin begin
// if key not yet processed, let windows process it // if key not yet processed, let windows process it
WinProcess := LMKey.CharCode <> VK_UNKNOWN; WinProcess := LMKey.CharCode <> VK_UNKNOWN;
WParam := LMChar.CharCode;
end; end;
else else
@ -1223,21 +1225,21 @@ Begin
case Msg of case Msg of
WM_CHAR: WM_CHAR:
begin begin
CharCode := LMChar.CharCode; LMChar.CharCode := Word(WParam);
LMChar.Msg := LM_CHAR; LMChar.Msg := LM_CHAR;
end; end;
WM_KEYDOWN: WM_KEYDOWN:
begin begin
CharCode := LMKey.CharCode; LMKey.CharCode := Word(WParam);
LMKey.Msg := LM_KEYDOWN; LMKey.Msg := LM_KEYDOWN;
end; end;
WM_KEYUP: WM_KEYUP:
begin begin
CharCode := LMKey.CharCode; LMKey.CharCode := Word(WParam);
LMKey.Msg := LM_KEYUP; LMKey.Msg := LM_KEYUP;
end; end;
end; end;
case CharCode of case WParam of
VK_RETURN: VK_RETURN:
DlgCode := DLGC_WANTALLKEYS; DlgCode := DLGC_WANTALLKEYS;
VK_TAB: VK_TAB:
@ -1452,6 +1454,9 @@ end;
{ {
$Log$ $Log$
Revision 1.160 2004/11/12 15:33:13 vincents
fix changing key in OnKeyPress event.
Revision 1.159 2004/11/12 15:30:30 vincents Revision 1.159 2004/11/12 15:30:30 vincents
send CM_TEXTCHANGED for TCustomMemo send CM_TEXTCHANGED for TCustomMemo