Article View: comp.os.ms-windows.programmer.misc
Article #2296Re: ToolBar under MDI application
From: Baruch Nissenbaum
Date: Sat, 23 Jan 1993 20:31
Date: Sat, 23 Jan 1993 20:31
27 lines
1832 bytes
1832 bytes
In article <727643543snz@chrism.demon.co.uk> chris@chrism.demon.co.uk writes:
>In article <dtam.727607040@sfu.ca> dtam@fraser.sfu.ca writes:
>
>>I have a toolbar implemented in my MDI application. However, my child windows
>>will ovelap the toolbar. Can anyone tell me how to resize the MDI client
>>windows so that it will not ovelapped with the toolbar. The MDI frame window is
>>the parent of both the toolbar window and the MDI client window!!
>>
>
>The answer is to have the Toolbar window as a child of the FRAME window,
>not of the MDI client. All you have to do then is process the WM_SIZE
>message in the frame window proc, and resize/move the MDI client window
>yourself, rather than passing WM_SIZE on to DefFrameProc, which resizes
>the MDI client to fill the client area of the frame window.
>
1. Making a window be a son of the MDI frame is not trivial in OWL..
I found two ways to do this:
a. Create the child window with a null parent, then call SetParent
to set the parent be the MDI window. (not touching the child).
b. In the constructor of toolbar call SetFlags( WB_MDICHILD, 0).
2. All child windows that process WM_SIZE must also call the default WM_SIZE
method to make the MDI work correctly.
Good luck ! (you'll need much if your working in MSwindows..)
Baruch
Technical Details
Message-ID:
<1993Jan23.203157.1420@aristo.tau.ac.il>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!blekul11!frmop11!barilvm!aristo.tau.ac.il!baruchReferences:
<dtam.727607040@sfu.ca> <727643543snz@chrism.demon.co.uk>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!blekul11!frmop11!barilvm!aristo.tau.ac.il!baruch From: baruch@genius.tau.ac.il (Baruch Nissenbaum ) Subject: Re: ToolBar under MDI application Message-ID: <1993Jan23.203157.1420@aristo.tau.ac.il> Sender: usenet@aristo.tau.ac.il (USENET) Organization: Tel Aviv University ISRAEL References: <dtam.727607040@sfu.ca> <727643543snz@chrism.demon.co.uk> Date: Sat, 23 Jan 1993 20:31:57 GMT Lines: 27