mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 03:59:10 +02:00
LCL Win32: Prevent a beep from valid control accelerators (Alt+Key). Issue #27687, patch from ChrisF.
git-svn-id: trunk@48417 -
This commit is contained in:
parent
8ffc5aba40
commit
82504c2aaf
@ -2502,10 +2502,11 @@ begin
|
||||
|
||||
if WinProcess then
|
||||
begin
|
||||
if (Msg=WM_CHAR) and ((WParam=VK_RETURN) or (WPARAM=VK_ESCAPE)) and
|
||||
if ((Msg=WM_CHAR) and ((WParam=VK_RETURN) or (WPARAM=VK_ESCAPE)) and
|
||||
((lWinControl is TCustomCombobox) or
|
||||
((lWinControl is TCustomEdit) and not (lWinControl is TCustomMemo ))
|
||||
)
|
||||
))
|
||||
or (Msg=WM_SYSCHAR) // Windows message processing is postponed
|
||||
then
|
||||
// this thing will beep, don't call defaultWindowProc
|
||||
else
|
||||
@ -2542,6 +2543,10 @@ begin
|
||||
if (lWinControl <> nil) and (PLMsg^.Result = 0) and CharCodeNotEmpty then
|
||||
DeliverMessage(lWinControl, PLMsg^);
|
||||
|
||||
// Windows message processing for WM_SYSCHAR not processed (will get WM_MENUCHAR)
|
||||
if (Msg=WM_SYSCHAR) and (PLMsg^.Result = 0) and CharCodeNotEmpty then
|
||||
PLMsg^.Result := CallDefaultWindowProc(Window, Msg, WParam, LParam);
|
||||
|
||||
// handle Ctrl-A for edit controls
|
||||
if (PLMsg^.Result = 0) and (Msg = WM_KEYDOWN) and (WParam = Ord('A'))
|
||||
and (GetKeyState(VK_CONTROL) < 0) and (GetKeyState(VK_MENU) >= 0) then
|
||||
|
Loading…
Reference in New Issue
Block a user