Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!cscnj!paul From: paul@cscnj.csc.COM (Paul Moody) Newsgroups: comp.windows.ms Subject: Re: Child windows Summary: Child windows Message-ID: <335@cscnj.csc.COM> Date: 25 Sep 89 19:40:00 GMT References: <809@tuminfo1.lan.informatik.tu-muenchen.dbp.de> <810@tuminfo1.lan.informatik.tu-muenchen.dbp.de> Organization: Computer Sciences Corp., Piscataway NJ Lines: 32 In article <810@tuminfo1.lan.informatik.tu-muenchen.dbp.de>, rommel@lan.informatik.tu-muenchen.dbp.de (Kai-Uwe Rommel) writes: > When I create some overlapped child windows in the client area of a > program, they all get an "inactive" border and caption bar. I did not > find a usable way to get the child window with the input focus having > an "active" frame and caption bar (like it is the case in Excel). ... deleted .... > Can anybody help ? > > Thanks in advance, > > Kai Uwe Rommel, Munich What you must do is control the style of the child window yourself. This is done using the SetWindowLong call. eg: SetWindowLong(hChildWnd, GWL_STYLE, WS_CHILD | WS_SYSMENU | WS_CAPTION | WS_VISIBLE); is a minimal call to "activate" a child window. Note that you must send WM_ACTIVATE and WM_NCACTIVATE messages yourself. Also, you must keep track of which child is active. If the child is obscured, you must call BringWindowToTop to make it visible. There was a good intro to mdi in Microsoft System Journal, but I dont remember the issue. In Windows version 3, mdi is "builtin". I havent played with it yet, but it looks better than the "roll your own" versions. Paul Moody -- Paul Moody @CSC ...usual disclaimer...