🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #480

ToolBox with buttons in MDI environment

#480
From: Jeroen W. Pluimers
Date: Sat, 15 Aug 1992 08:39
56 lines
2255 bytes
Hi All,


I want to make my own ToolBox like BC++ has in an MDI environment.
The code has to work in TPW, but examples in C are welcome too.

I tried the followind:

constructor TButtonsDialogWindow.init;
begin
  TJanusDialogWindow.Init(aParent, aName, BorStyle);
  SetFlags(wb_MDIChild, False);
end;

procedure TButtonsDialogWindow.GetWindowClass(var AWndClass: TWndClass);
begin
  TJanusDialogWindow.GetWindowClass(AWndClass);
  AWndClass.hIcon := LoadIcon(HInstance, MakeIntResource(icButtons));
  { Attr.Style := Attr.Style or ws_Group or ws_TabStop or
                  ws_Child or ws_OverlappedWindow or ws_Visible; }
end;

The style is as follows:

STYLE WS_CHILD | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX


And it is used in the main program like this:

constructor TMDIdBaseWindow.Init;
begin
   TMDIWindow.Init(ATitle, AMenu);
   Attr.Style := Attr.Style or ws_ClipChildren;
   { ChildMenuPos := 3; }
end;

procedure TMDIdBaseWindow.SetupWindow;
begin
  TMDIWindow.SetupWindow;
  { MenuItems(Disable); }
  Application^.MakeWindow(
end;


The problem is that the ToolBox doesn't get the focused caption (I can press
buttons and move the window), and when the MDI frame is restored from a 
minimized state, the ToolBox sometimes draws partly over the active MDI child.

--
    o _   _  _   _   _             voice: +31-2522-20908 (19:00-24:00 UTC)
   / (_' |  (_) (_' | |            snail: P.S.O.
__/                                       attn. Jeroen W. Pluimers
                                          P.O. Box 266
jeroenp@rulfc1.LeidenUniv.nl              2170 AG Sassenheim
jeroen_pluimers@f521.n281.z2.fidonet.org  The Netherlands
Technical Details
Message-ID: <1992Aug15.083924.19587@rulway.LeidenUniv.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!rulfc1!jeroenp

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!rulfc1!jeroenp
From: jeroenp@rulfc1.LeidenUniv.nl (Jeroen W. Pluimers)
Subject: ToolBox with buttons in MDI environment
Message-ID: <1992Aug15.083924.19587@rulway.LeidenUniv.nl>
Sender: root@rulway.LeidenUniv.nl (System PRIVILEGED Account)
Nntp-Posting-Host: rulfc1.leidenuniv.nl
Organization: Dept. FMC, Gorlaeus Labs, Leiden University, The Netherlands
Date: Sat, 15 Aug 92 08:39:24 GMT
Lines: 56