Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!uunet!mcsun!unido!nixpbe!nixsin!bieniekb From: bieniekb@nixsin.UUCP (Beate Bieniek-Moores) Newsgroups: comp.windows.ms.programmer Subject: Re: Status Window in Application using MDI Keywords: MDI Message-ID: <1984@nixsin.UUCP> Date: 14 Jun 91 13:51:12 GMT Organization: Nixdorf Regional HQ Pte Ltd, Singapore Lines: 51 # 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 Thanks for your help Keith. It seems a very logical solution to my problem. However, it may work for you but not for me! It looks as if the Re- sizing of the client area (MoveWindow(hMDIClient,...) has no effect as I still can move the MDI child windows over the statusline. I am still very puzzled, somewhat like 'Alice in Windowsland'. Any other suggestions? Thanks and regards, - Beate