mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 21:40:25 +02:00
wince: implements sending back key as backspace to controls
git-svn-id: trunk@26841 -
This commit is contained in:
parent
902ff34fcd
commit
c3c6eb4583
@ -1936,6 +1936,16 @@ begin
|
||||
Assigned(TWinCEWidgetSet(WidgetSet).FOnAsyncSocketMsg) then
|
||||
exit(TWinCEWidgetSet(WidgetSet).FOnAsyncSocketMsg(WParam, LParam))
|
||||
end;
|
||||
WM_HOTKEY:
|
||||
begin
|
||||
// Implements back-key sending to edits, instead of hiding the form
|
||||
// See http://bugs.freepascal.org/view.php?id=16699
|
||||
if HIWORD(lParam) = VK_ESCAPE then
|
||||
begin
|
||||
SHSendBackToFocusWindow(Msg, wParam, lParam);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
else
|
||||
// pass along user defined messages
|
||||
if Msg >= WM_USER then
|
||||
|
@ -86,6 +86,10 @@ function ImageList_Copy(himlDst: HIMAGELIST; iDst: longint; himlSrc: HIMAGELIST;
|
||||
function ImageList_Copy(himlDst: HIMAGELIST; iDst: longint; himlSrc: HIMAGELIST; Src: longint; uFlags: UINT): BOOL; cdecl; external KernelDLL;
|
||||
{$endif}
|
||||
|
||||
{$ifdef wince}
|
||||
procedure SHSendBackToFocusWindow(uMsg: UINT; wp: WPARAM; lp: LPARAM); cdecl; external 'aygshell' index 97;
|
||||
{$endif}
|
||||
|
||||
const
|
||||
// BlendOp flags
|
||||
AC_SRC_OVER = $00;
|
||||
|
@ -232,6 +232,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// Implements back-key sending to edits, instead of hiding the form
|
||||
// See http://bugs.freepascal.org/view.php?id=16699
|
||||
if mbi.hwndMB <> 0 then
|
||||
begin
|
||||
SendMessage(mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_ESCAPE,
|
||||
MAKELPARAM(SHMBOF_NODEFAULT or SHMBOF_NOTIFY, SHMBOF_NODEFAULT or SHMBOF_NOTIFY));
|
||||
end;
|
||||
|
||||
{$ifdef VerboseWinCEMenu}
|
||||
DebugLn('[CeSetMenu] menu bar window = ' + IntToStr(mbi.hwndMB) +
|
||||
' mbi.nToolBarId = ' + IntToStr(mbi.nToolBarId));
|
||||
|
Loading…
Reference in New Issue
Block a user