home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5313 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.8 KB  |  39 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!news.univie.ac.at!blekul11!frmop11!barilvm!aristo.tau.ac.il!baruch
  3. From: baruch@genius.tau.ac.il (Baruch Nissenbaum )
  4. Subject: Re: ToolBar under MDI application
  5. Message-ID: <1993Jan23.203157.1420@aristo.tau.ac.il>
  6. Sender: usenet@aristo.tau.ac.il (USENET)
  7. Organization: Tel Aviv University ISRAEL
  8. References: <dtam.727607040@sfu.ca> <727643543snz@chrism.demon.co.uk>
  9. Date: Sat, 23 Jan 1993 20:31:57 GMT
  10. Lines: 27
  11.  
  12. In article <727643543snz@chrism.demon.co.uk> chris@chrism.demon.co.uk writes:
  13. >In article <dtam.727607040@sfu.ca> dtam@fraser.sfu.ca writes:
  14. >
  15. >>I have a toolbar implemented in my MDI application. However, my child windows
  16. >>will ovelap the toolbar. Can anyone tell me how to resize the MDI client
  17. >>windows so that it will not ovelapped with the toolbar. The MDI frame window is
  18. >>the parent of both the toolbar window and the MDI client window!!
  19. >>
  20. >
  21. >The answer is to have the Toolbar window as a child of the FRAME window,
  22. >not of the MDI client.  All you have to do then is process the WM_SIZE
  23. >message in the frame window proc, and resize/move the MDI client window
  24. >yourself, rather than passing WM_SIZE on to DefFrameProc, which resizes
  25. >the MDI client to fill the client area of the frame window.
  26. >
  27.  
  28. 1. Making a window be a son of the MDI frame is not trivial in OWL..
  29.    I found two ways to do this:
  30.     a. Create the child window with a null parent, then call SetParent
  31.        to set the parent be the MDI window. (not touching the child).
  32.     b. In the constructor of toolbar call SetFlags( WB_MDICHILD, 0).
  33.  
  34. 2. All child windows that process WM_SIZE must also call the default WM_SIZE
  35.    method to make the MDI work correctly.
  36.  
  37. Good luck !    (you'll need much if your working in MSwindows..)
  38.   Baruch
  39.