bieniekb@nixsin.UUCP (Beate Bieniek-Moores) (06/13/91)
Hello fellow Windows Programmer! 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... Thanks in advance for your help. - Beate +-------------------------------------+--------------------------------------+ | Beate Bieniek-Moores | Voice: (Singapore) 740-2940 | | Siemens Nixdorf Information Systems | Fax : (Singapore) 745-0495 | | Software Center Singapore (SCS) | Email: bieniek.sin@nixdorf.com (US) | | 2 Kallang Sector | bieniek.sin@nixdorf.de (EU) | | Singapore 1334 | | +-------------------------------------+--------------------------------------+ | "Either I will find a way or I will make one". (Sir Philip Sidney) | +----------------------------------------------------------------------------+
kshafer@tortuga.SanDiego.NCR.COM (Keith Shafer) (06/13/91)
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
epperson@adobe.COM (Mark Epperson) (06/14/91)
Newsgroups: comp.windows.ms.programmer Subject: Re: Statusline Window in Application using MDI Summary: Expires: References: <1978@nixsin.UUCP> Sender: Reply-To: epperson@adobe.UUCP (Mark Epperson) Followup-To: Distribution: Organization: Adobe Systems Incorporated, Mountain View Keywords: MDI In article <1978@nixsin.UUCP> bieniekb@nixsin.UUCP (Beate Bieniek-Moores) writes: > >Hello fellow Windows Programmer! > >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... > > Try calling MoveWindow(hwndMDIClient, ..... ) AFTER processing the WM_SIZE message for the frame proc. works just fine. Mark Epperson Newsgroups: comp.windows.ms.programmer Subject: Re: Statusline Window in Application using MDI Summary: Expires: References: <1978@nixsin.UUCP> Sender: Reply-To: epperson@adobe.UUCP (Mark Epperson) Followup-To: Distribution: Organization: Adobe Systems Incorporated, Mountain View Keywords: MDI In article <1978@nixsin.UUCP> bieniekb@nixsin.UUCP (Beate Bieniek-Moores) writes: > >Hello fellow Windows Programmer! > >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... > > Try calling MoveWindow(hwndMDIClient, ..... ) AFTER processing the WM_SIZE message for the frame proc. works just fine. Mark Epperson
clif_w1@verifone.com (06/17/91)
> Does anybody know how the Windows File Manager sets up the status line > window positioned at the bottom of the frame window? > 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 tied the same setup, not using mdi; but I found that the resizing and painting was too slow. I used spy on the File Manager and found that their status line is not a child window but is simply painted onto the client window. So that's what I do now, seems to work fine. ------------------------ ----------------------- | Clif Westin | | | | MIS - VeriFone Inc. | | Make war, not love, | | clif_w1@verifone.com | | It's safer! :-) | | (808) 625-3188 | | | ------------------------ -----------------------
bieniekb@nixsin.UUCP (Beate Bieniek-Moores) (06/17/91)
Thanks a lot for all your help (especially Keith Shafer and Mark Epperson). The programming hint to forward is: When reseizing the client area of the frame whilst processing the WM_SIZE message for the frame window, you may not pass the WM_SIZE message to DefFrameProc(), otherwise the reseize will have no effect. This is in the SDK manual, but again in a place you would least have expected it the least :-)... Regards, - Beate +-------------------------------------+--------------------------------------+ | Beate Bieniek-Moores | Voice: (Singapore) 740-2940 | | Siemens Nixdorf Information Systems | Fax : (Singapore) 745-0495 | | Software Center Singapore (SCS) | Email: bieniek.sin@nixdorf.com (US) | | 2 Kallang Sector | bieniek.sin@nixdorf.de (EU) | | Singapore 1334 | | +-------------------------------------+--------------------------------------+ | "Either I will find a way or I will make one". (Sir Philip Sidney) | +----------------------------------------------------------------------------+