Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!brunix!cs169054 From: cs169054@brunix (Peter Golde) Newsgroups: comp.os.os2 Subject: Re: Focus cycling Message-ID: <21629@brunix.UUCP> Date: 27 Nov 89 17:43:00 GMT References: <627646071.19046@minster.york.ac.uk> <13958@orstcs.CS.ORST.EDU> Sender: news@brunix.UUCP Reply-To: cs169054@cslab7f.UUCP (Peter Golde) Organization: Brown University Department of Computer Science Lines: 31 >>In article 92, osbornk@uther.CS.ORST.EDU (Kasey S. Osborn) writes: >>>Okay, fine, to go one of the two directions, I set the focus to the >>>bottommost child window. That takes care of Shift-Tab. >>> >>>However, when it comes to setting the focus to the window that is >>>just below the focus window, I am having difficulty. Somehow I need >>>to make the focus window become the bottommost window. This is what >>>OS/2 does to windows listed in Task List when one hits Alt-Esc. >>> >>>Setting the focus to the window next to the top causes the focus >>>window to be moved second. This limits you to switching between the >>>two topmost windows, so that's out. Any ideas? (Proven, please.) How about, in each of the subwindow's window procedures, whenever they loses the focus or become de-activated, setting themselves to the bottom most window (with WinSetWindowPos). I.e., the window procedure would have something like (I don't have a manual here, so this is probably not correct in any details: switch (msg) { case WM_ACTIVATE or WM_SETFOCUS: if (SHORT?FROMMP(mp?) == 0) { // losing focus... WinSetWindowPos(hwndFrame, ..., HWND_BOTTOM, ...., SWP_ZORDER); } That should work, but of course I've never actually tried it. Alternatively, whatever function is causing the window to lose the focus could do the moving of the window. Whatever is more elegant for your app. --Peter Golde