Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!genrad!cig From: cig@genrad.UUCP (Charles I. Ganimian Jr.) Newsgroups: comp.windows.ms Subject: Re: Why does SetFocus fail? Keywords: SetFocus Child WM_ACTIVATEAPP Message-ID: <17169@genrad.UUCP> Date: 14 Feb 89 13:29:52 GMT References: <224@nbires.nbi.com> Reply-To: cig@genrad.UUCP (Charles I. Ganimian Jr.) Distribution: na Organization: GenRad, Inc., Concord, Mass. Lines: 15 In article <224@nbires.nbi.com> matt@nbires.nbi.com (Matthew Meighan) writes: >I have an app that has a parent window with three child windows. Each >of the children's message handling procedures detects when the tab key >is pressed and sets the focus to the next of the three. > What I have found to work is to process WM_ACTIVATEAPP in the parent and check if wParam != 0 (then you are are receiving the focus) and PostMessage WM_ACTIVATE to child window, which processes WM_ACTIVATE and sets focus to a child window control (button) or its self in your case. good luck and I hope this helped charlie g.