🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #3234

Re: Statusline Window in Application using MDI

#3234
From: Keith Shafer
Date: Thu, 13 Jun 1991 16:04
38 lines
2203 bytes
In article <1978@nixsin.UUCP> bieniekb@nixsin.UUCP (Beate Bieniek-Moores) writes:
>Does anybody know how the Windows File Manager sets up the status line
>window positioned at the bottom of the frame window?
>
>I wrote a program doing this without MDI and it works fine (statusline
>created as child window, processing of WM_SIZE messages of the
>parent window etc.).
>
>However, integrating these codes into a program using MDI leads to the
>following problem:
>
>The child windows can be moved over the statusline, covering it up. When
>these child windows are moved away again, the statusline does not get
>re-painted. I am really kind of blurr (this is Sing-lish) about this...
>

I had the same problem on a project I was working on.  Here is how I solved
it.
  1) In the WM_CREATE for the FrameWindow create the MDIClient window with
     sizes of 0,0,0,0 (x,y,nx,ny).
  2) After the MDIClient has been created, create the StatusLine window as
     a child of the FrameWindow with sizes of 0,0,0,0.
  3) In the WM_SIZE message for the FrameWindow, do the following

         RECT rc;
         GetClientRect(hFrameWindow, &rc);
         MoveWindow(hStatusLine, 0, rc.bottom - nStatusLineHeight,
                      rc.right, nStatusLineHeight, TRUE);
         MoveWindow(hMDIClient, 0, 0,
                      rc.right, rc.bottom - nStatusLineHeight, TRUE);

What this will do is create a MDIClient window that is smaller than the Frame
client space.  Hope this helps...

- Keith

------------
   Keith.Shafer@SanDiego.NCR.COM
Technical Details
Message-ID: <1991Jun13.160451.18852@donner.SanDiego.NCR.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!sol.ctr.columbia.edu!emory!hubcap!ncrcae!ncr-sd!SanDiego.NCR.COM!tortuga!kshafer
References: <1978@nixsin.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!sol.ctr.columbia.edu!emory!hubcap!ncrcae!ncr-sd!SanDiego.NCR.COM!tortuga!kshafer
From: kshafer@tortuga.SanDiego.NCR.COM (Keith Shafer)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Statusline Window in Application using MDI
Keywords: MDI
Message-ID: <1991Jun13.160451.18852@donner.SanDiego.NCR.COM>
Date: 13 Jun 91 16:04:51 GMT
References: <1978@nixsin.UUCP>
Sender: news@donner.SanDiego.NCR.COM (News Owner)
Reply-To: kshafer@tortuga.SanDiego.NCR.COM (Keith Shafer)
Organization: NCR Corporation, Rancho Bernardo
Lines: 38