Article View: comp.os.os2.programmer.misc
Article #36Re: Initial Session Title? Tried WinQuerySwitchList,WinQueryWindowText,LM_QUERYITEMTEXT
From: Rick Curry
Date: Wed, 22 Apr 1998 00:00
Date: Wed, 22 Apr 1998 00:00
58 lines
3669 bytes
3669 bytes
In article <353665BC.15FB@austin.ibm.nospam.com>, Jim Lewis <jklewis@austin.ibm.nospam.com> wrote: >trindflo@fishnet.net wrote: >> >> Could somebody help me with a tricky session manager question? I am >> attempting to find the "initial" Title field of a task as displayed >> in the Window List or Task List which is displayed when Ctl-Esc is typed. > > I can't tell what you're asking for here, but I think I have an answer >for you anyway. Years ago I wrote an app which would always show you the >titlebar of whatever object had the focus. I'll see if I can did it up >and send the source to you. With a little tweaking I think it will do >what you want. Jim, Thanks for responding. I think that I am getting this text (the title bar text) with WinQueryWindowText. Unfortunately, it is also changed to the name of the currently running program. I have created ICONs which I use to start full-screen sessions in various sub-directories with whatever settings are appropriate. When I launch one of these ICONs, the ICON/Program-Object title from the General page of the settings notebook is entered as the session title in the Window List. This is the string I am looking for. When I run a program in this session the session title in the Window List changes to the name of the program which is running. I have found two or three different ways to ask for this sort of information and it always seems to yield the name of the program which is running. I was able to determine the name of the program which was initially running in the session (CMD or in my case 4OS2), but I have not been able to get at the title. I just got through attempting to access the information with container controls and found that the task list window does not respond to a CM_QUERYCNRINFO command. I don't think that the Workplace shell wants me to do things this way. It is trivial to attach an object-ID (a <str> identifier) to a program ICON and control the program that way. Unfortunately, this would preclude controlling multiple sessions which had been started with the same ICON (many attempts to control would start a new session). This "Create a new session" behavior is the default for the OS/2 Full Screen ICON, as an example. What I am looking for is a way to identify the origin of a session. Since the information I am looking for is displayed in a window (the task list), I have been assuming that I could get at it. Thanks again to you and the others who responded. -- * Do not send me Spam, Junk email, or UCE. Using the internet this way is * * theft and harassment. Doing so will cost $20 per word of offending email.* -Rick Curry (Team OS/2) http://www.fishnet.net/~trindflo http://www.cauce.org GCS/M/S d? s+:+ a+ C++++$ UL- P L+ E---- W+ N+ o? K? !w--- O+++ M@ V PS++ PE Y+ PGP t@ 5++ X- R* tv+ b++ DI+ D+ G e++ h++ r+++ y++++ v3.12
Technical Details
Message-ID:
<pZnP1MCUw4xb089yn@fishnet.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6h4e34$jfo$1@nnrp2.dejanews.com> <353665BC.15FB@austin.ibm.nospam.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cd94,91e76f0589441dac X-Google-Attributes: gid10cd94,public X-Google-Thread: 11307a,91e76f0589441dac X-Google-Attributes: gid11307a,public From: trindflo@fishnet.net (Rick Curry) Subject: Re: Initial Session Title? Tried WinQuerySwitchList,WinQueryWindowText,LM_QUERYITEMTEXT Date: 1998/04/22 Message-ID: <pZnP1MCUw4xb089yn@fishnet.net> X-Deja-AN: 346936377 Content-Transfer-Encoding: 8bit References: <6h4e34$jfo$1@nnrp2.dejanews.com> <353665BC.15FB@austin.ibm.nospam.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Richard Curry Consulting -- Firmware and System specialist Mime-Version: 1.0 Newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l