Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvlx!bturner From: bturner@hpcvlx.HP.COM (Bill Turner) Newsgroups: comp.windows.ms Subject: Re: Multiple 'main' windows ? Message-ID: <106580031@hpcvlx.HP.COM> Date: 16 Mar 89 18:58:13 GMT References: <11587@umn-cs.CS.UMN.EDU> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 26 > I've tried it and it seems to work (sort-of) - everything is fine > except for the fact that some messages mysteriously don't make it > to the message processor of my 2'nd (and following) windows - I know that accelerator messages wouldn't show up in the 2nd et al windows without a lot of work, since TranslateAccelerator sends the message to the specified window (hWnd), regardless of which window was to get the message... You could do something like this (making sure the toplevel windows didn't have overlapping accelerator definitions): while (GetMessage(...)) { if (TranslateAccelerator(hWnd1, hAccels1, &msg)) continue; if (TranslateAccelerator(hWnd2, hAccels2, &msg)) continue; etc. } You might also get the WM_ACTIVATEAPP message only in the first window. I can't think of any others, though. I'm a bit surprised that WM_COMMAND doesn't come in correctly (other than the accelerators case above). --Bill Turner