From 0adc0401992bebfab46cd20a680832b7e2ee655e Mon Sep 17 00:00:00 2001 From: vincents Date: Fri, 26 Nov 2004 11:23:38 +0000 Subject: [PATCH] fixed sending two lm_setfocus message for combobox. git-svn-id: trunk@6297 - --- lcl/interfaces/win32/win32callback.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index 0e15cc72d9..6742ba7ca1 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1349,7 +1349,10 @@ function ComboBoxWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam; begin // darn MS: if combobox has edit control, and combobox receives focus, it // passes it on to the edit, so it will send a WM_KILLFOCUS; inhibit - if (Msg = WM_KILLFOCUS) and (Windows.GetTopWindow(Window) <> HWND(nil)) then + // also don't pass WM_SETFOCUS to the lcl, + // it will get one from the edit control + if ((Msg = WM_KILLFOCUS) or (Msg = WM_SETFOCUS)) and + (Windows.GetTopWindow(Window) <> HWND(nil)) then begin // continue normal processing, don't send to lcl Result := CallDefaultWindowProc(Window, Msg, WParam, LParam); @@ -1473,6 +1476,9 @@ end; { $Log$ + Revision 1.168 2004/11/26 11:23:38 vincents + fixed sending two lm_setfocus message for combobox. + Revision 1.167 2004/11/21 21:09:29 vincents use message name instead of number in debug message. postponed removing properties until wm_ncdestroy.