Thread View: comp.windows.ms.programmer
1 messages
1 total messages
Started by Jeroen W. Pluimers
Sat, 15 Aug 1992 08:39
ToolBox with buttons in MDI environment
Author: Jeroen W. Pluimers
Date: Sat, 15 Aug 1992 08:39
Date: Sat, 15 Aug 1992 08:39
56 lines
2255 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads