home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4256 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.6 KB  |  71 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: Status Line in MDI Application 
  5. Distribution: world
  6. References: <1992Dec15.082236.21852@neptune.inf.ethz.ch>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 56
  11. Date: Tue, 15 Dec 1992 18:55:33 +0000
  12. Message-ID: <724445733snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <1992Dec15.082236.21852@neptune.inf.ethz.ch> skimmel@iiic.ethz.ch writes:
  16.  
  17. >I am currently programming an application using MDI. I want to use
  18. >a status line at the bottom of the application to display status 
  19. >information (like e.g. WfW).
  20. >
  21. >Do I have to create an own "status line" MDI Child or is there an
  22. >easier possibility? 
  23. >
  24. >Is there some sample code around (ftp)?
  25. >
  26. >I am using MS C7. Thanks for your help
  27. >
  28. >        Stefan
  29. >
  30. >Stefan Kimmel                           skimmel@inf.ethz.ch
  31. >
  32. >
  33.  
  34. There are a number of different ways to set up a status line, but this is the
  35. method I use, which works well:
  36.  
  37. 1.  Create a "status line" window which is a child of the *Frame* window,
  38.     ie, NOT an MDI child.
  39.  
  40. 2.  When you receive a WM_SIZE message in the frame window procedure,
  41.     carry out the following actions:
  42.  
  43.     a)  Decide how high the status line window should be.  This is normally
  44.         fixed, so you can just store it somewhere.
  45.  
  46.     b)  Call "MoveWindow" to reposition the status line window at the bottom
  47.         of the frame window's client area, setting its width equal to the
  48.         width of the main window's client area.
  49.  
  50.     c)  Call "MoveWindow" again to resize the MDI client window window,
  51.         setting its height equal to the height of the frame window's client
  52.         area minus the status line window's height, and its width equal to
  53.         the width of the frame window client area.
  54.  
  55.     d)  Return 0 from the window procedure.  Do NOT call DefFrameProc!!!!
  56.  
  57. This should get you want you want - a status line which stays at the bottom
  58. of the main window, with the MDI children positioned above it.
  59.  
  60. Hope this helps you.
  61.  
  62. Chris
  63. -- 
  64. --------------------------------------------------------------------------
  65. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  66. | Warrington, UK                           | BIX: cmarriott              |
  67. | (Still awaiting inspiration              | CIX: cmarriott              |
  68. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  69. --------------------------------------------------------------------------
  70.  
  71.