Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-08

Patch win32: window owner, taskbar grouping

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen
to Micha Nelissen: Attached is a patch which makes windows stick together if one form own another. In the…
Micha Nelissen wrote 6 lines
Hi, Attached is a patch which makes windows stick together if one form own another. In the case of lazarus, when you click lazarus on taskbar, both the object inspector and the source editor appear. Otherwise the object inspector is lost, because it does not have a button on the taskbar.

Maybe you shouldn't apply the second part of the patch: that's for something else. Remove the begin and end, FParentWindow should always have a value if a form is defined.

Sorry about that,

Micha.

Show quoted text 11 lines
@@ -2018,8 +2021,10 @@ writeln('Exception occured creating window'); end; If (FMainForm = Nil) And (Application.MainForm = Nil) Then + begin FMainForm := TForm(Sender); FParentWindow := Window; + end; Assert(False, 'Trace:CreateComponent - Form Window Handle Value = $' + IntToHex(Window, 8)); Assert(False, 'Trace:Creating a Form - SetProp'); DoSubClass := false;

Reply by email

Micha Nelissen

Hi,

Attached is a patch which makes windows stick together if one form own another. In the case of lazarus, when you click lazarus on taskbar, both the object inspector and the source editor appear. Otherwise the object inspector is lost, because it does not have a button on the taskbar.

Regards,

Micha.

Index: win32object.inc
===================================================================
RCS file: /FPC/CVS/projects/lazarus/lcl/interfaces/win32/win32object.inc,v
retrieving revision 1.101
diff -u -w -r1.101 win32object.inc
--- win32object.inc	28 Aug 2003 09:10:01 -0000	1.101
+++ win32object.inc	30 Aug 2003 15:55:16 -0000
@@ -2010,6 +2010,9 @@
       bsSizeToolWin:
         FlagsEx:=WS_EX_TOOLWINDOW;
       End;//case
+      if (Parent = HWND(nil)) and (TCustomForm(Sender).Owner is TCustomForm) then
+        Parent := TCustomForm(TCustomForm(Sender).Owner).Handle;
+
       If TCustomForm(Sender).FormStyle = fsStayOnTop Then
         FlagsEx:= FlagsEx or WS_EX_TOPMOST;
       try
@@ -2018,8 +2021,10 @@
         writeln('Exception occured creating window');
       end;
       If (FMainForm = Nil) And (Application.MainForm = Nil) Then
+      begin
         FMainForm := TForm(Sender);
       FParentWindow := Window;
+      end;
       Assert(False, 'Trace:CreateComponent - Form Window Handle Value = $' + IntToHex(Window, 8));
       Assert(False, 'Trace:Creating a Form - SetProp');
       DoSubClass := false;

Reply by email

Mattias Gaertner
to Micha Nelissen
Show quoted text 13 lines
Micha Nelissen wrote: > Hi, > > Attached is a patch which makes windows stick together if one form own > another. In the case of lazarus, when you click lazarus on taskbar, both > > the object inspector and the source editor appear. Otherwise the object > inspector is lost, because it does not have a button on the taskbar. Maybe you shouldn't apply the second part of the patch: that's for something else. Remove the begin and end, FParentWindow should always have a value if a form is defined.

Applied. Thanks.

Mattias

Show quoted text 22 lines
Sorry about that, Micha. > @@ -2018,8 +2021,10 @@ > writeln('Exception occured creating window'); > end; > If (FMainForm = Nil) And (Application.MainForm = Nil) Then > + begin > FMainForm := TForm(Sender); > FParentWindow := Window; > + end; > Assert(False, 'Trace:CreateComponent - Form Window Handle Value = > $' + IntToHex(Window, 8)); Assert(False, 'Trace:Creating a Form - > SetProp'); DoSubClass := false; _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email