🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1848

Re: Status Line in MDI Application

#1848
From: Chris Marriott
Date: Tue, 15 Dec 1992 18:55
56 lines
2697 bytes
In article <1992Dec15.082236.21852@neptune.inf.ethz.ch> skimmel@iiic.ethz.ch writes:

>I am currently programming an application using MDI. I want to use
>a status line at the bottom of the application to display status 
>information (like e.g. WfW).
>
>Do I have to create an own "status line" MDI Child or is there an
>easier possibility? 
>
>Is there some sample code around (ftp)?
>
>I am using MS C7. Thanks for your help
>
>        Stefan
>
>Stefan Kimmel                           skimmel@inf.ethz.ch
>
>

There are a number of different ways to set up a status line, but this is the
method I use, which works well:

1.  Create a "status line" window which is a child of the *Frame* window,
    ie, NOT an MDI child.

2.  When you receive a WM_SIZE message in the frame window procedure,
    carry out the following actions:

    a)  Decide how high the status line window should be.  This is normally
        fixed, so you can just store it somewhere.

    b)  Call "MoveWindow" to reposition the status line window at the bottom
        of the frame window's client area, setting its width equal to the
        width of the main window's client area.

    c)  Call "MoveWindow" again to resize the MDI client window window,
        setting its height equal to the height of the frame window's client
        area minus the status line window's height, and its width equal to
        the width of the frame window client area.

    d)  Return 0 from the window procedure.  Do NOT call DefFrameProc!!!!

This should get you want you want - a status line which stays at the bottom
of the main window, with the MDI children positioned above it.

Hope this helps you.

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Technical Details
Message-ID: <724445733snz@chrism.demon.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
References: <1992Dec15.082236.21852@neptune.inf.ethz.ch>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
Subject: Re: Status Line in MDI Application 
Distribution: world
References: <1992Dec15.082236.21852@neptune.inf.ethz.ch>
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Lines: 56
Date: Tue, 15 Dec 1992 18:55:33 +0000
Message-ID: <724445733snz@chrism.demon.co.uk>
Sender: usenet@demon.co.uk