diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index 7948bf0309..ac92588247 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1395,7 +1395,20 @@ Begin // we cannot tell for sure windows didn't want the key // winapi too inconsistent about return value + PLMsg^.Result := 0; DeliverMessage(lWinControl, PLMsg^); + + // 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 + begin + GetClassName(Window, winClassName, 20); + if CompareMem(@winClassName, @EditClsName, High(EditClsName)+1) then + begin + // select all + Windows.SendMessage(Window, EM_SETSEL, 0, -1); + end; + end; end; end; end; @@ -1524,6 +1537,9 @@ end; { $Log$ + Revision 1.198 2005/04/07 15:52:31 micha + implement Ctrl+A to select all text for edit controls + Revision 1.197 2005/04/06 10:43:40 micha customcheckbox: do not unnecessarily ask state twice first let widget process BM_SETCHECK, so we do not see itemindex=-1 in between diff --git a/lcl/interfaces/win32/win32int.pp b/lcl/interfaces/win32/win32int.pp index b3ad2f07cd..057f6ee39d 100644 --- a/lcl/interfaces/win32/win32int.pp +++ b/lcl/interfaces/win32/win32int.pp @@ -191,6 +191,7 @@ Type const BOOL_RESULT: Array[Boolean] Of String = ('False', 'True'); ClsName: array[0..6] of char = 'Window'#0; + EditClsName: array[0..4] of char = 'Edit'#0; ButtonClsName: array[0..6] of char = 'Button'#0; ComboboxClsName: array[0..8] of char = 'ComboBox'#0; TabControlClsName: array[0..15] of char = 'SysTabControl32'#0; @@ -290,6 +291,9 @@ End. { ============================================================================= $Log$ + Revision 1.136 2005/04/07 15:52:31 micha + implement Ctrl+A to select all text for edit controls + Revision 1.135 2005/03/03 13:13:51 vincents fixed thread synchronize support for fpc 1.9.9 using WakeMainThread