Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!reading!minster!paulb From: paulb@minster.york.ac.uk Newsgroups: comp.os.os2 Subject: Re: Focus Cycling Message-ID: <628520435.28025@minster.york.ac.uk> Date: 1 Dec 89 13:00:35 GMT Organization: Department of Computer Science, University of York, England Lines: 36 In article <13958@orstcs.CS.ORST.EDU> you write: >... >Ah, but I want the top window to be moved LAST. Thus, the second window >becomes the first, and the third the second... When the user hits >shift-tab the second time, there is conceptually no difference than >when he hits it the first time. This is what PM already does to Task >List windows, so it CAN be done. >... I'm sorry, I misunderstood, your previous message. It is certainly possible to do this. Call WinBeginEnumWindows(), and then WinGetNextWindow() to find the ordering of the windows. Put the top window to the bottom using WinSetWindowPos() (giving the parameter HWND_BOTTOM), and change focus to the second window (N.B. I haven't actually tried this, but from reading the doc. I see no reason why it shouldn't work). This will also allow the user to change the order "on the fly"; when he clicks on another window, simply bring it to the top, and call WinBeginEnumWindows() and WinGetNextWindow() as before, to find out what the new ordering is. I'm temporarily without an OS/2 system, so this is from memory, but I think I'm right in saying that this is not the method used by the task manager. Instead, the order in which you flip between windows is the order of the task list maintained by the task manager. (i.e. a second ordering). Forgive me if I'm mistaken. There was an article in the MS Systems Journal that you may find interesting called "MDI: An Emerging Standard for Manipulating Document Windows" by Kevin P. Welch (Vol 4, No 2, March 1989). It describes the Multiple Document Interface, as defined by IBM in their SAA. I gives a definition of a whole bunch of services that should be provided by any application program handling multiple documents via child windows. Have fun! PaulB->msgCount++