Guadagnini David schreef:
In attach You can found the patch modified.
Now is not lost focus on the window. Could you check it?
If this is committed, may I suggest some name changes?
IncludeForm -> ContainsForm (note the s, so no imperative)
Founded -> Found
Vincent
------------------------------------------------------------------------
Index: customform.inc
===================================================================
--- customform.inc (revision 13136)
+++ customform.inc (working copy)
@@ -873,6 +873,34 @@
var
FocusHandle : HWND;
MenuItem : TMenuItem;
+
+ {-----------------------------------------------------------------------
+ Return if the control contain a form
+ -----------------------------------------------------------------------}
+ function IncludeForm(Control : TWinControl) : Boolean;
+ var
+ I : Integer;
+ Founded : Boolean;
+ begin
+ Founded := False;
+ if Control <> Nil then
+ begin
+ I := 1;
+ while (I <= Control.ControlCount) And (Not Founded) do
+ begin
+ if (Control.Controls[I-1] Is TCustomForm)
+ then
+ Founded := True
+ else
+ If (Control.Controls[I-1] Is TWinControl)
+ then
+ Founded := IncludeForm(Control.Controls[I-1] As TWinControl);
+ Inc(I);
+ end;
+ end;
+ Result := Founded;
+ end;
+
begin
with TheMessage do
case Msg of
@@ -917,7 +945,7 @@
DebugLn('[TCustomForm.WndProc] ',Name,':',ClassName);
{$ENDIF}
LCLIntf.SetFocus(FocusHandle);
- exit;
+ if not IncludeForm(Self) then exit;
end;
end;
end;
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives