TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Craig Morrison
from: Ed Blackman
date: 1995-01-09 14:51:48
subject: NEW WINDOW NOTIFICATION

On  in a message to Ed Blackman, Craig Morrison wrote:

EB> I know about WinQuerySwitchList(), but I don't think sitting
EB> in a loop calling WinQuerySwitchList() until something
EB> changes is a very good way of doing what I want to do.

CM> How about using a timer that the end user can set the resolution on?

That's a good idea that I hadn't thought of, but someone on
comp.os.os2.programmer.misc on Usenet showed how to do what I
wanted:

>Is it possible to get PM to notify my program when something gets
>added to the switch list?  If so, how?

   I discovered this undocumented message when I wrote a virtual
desktop. It was undocumeted in v2.0, I haven't checked if it's ever
been documented.

  You have to put this in a system input hook, and example of which
is on hobbes as life.zip.

#define SH_SWITCHLIST 0x0080

     if( psmh->msg == SH_SWITCHLIST)
     {
           if (SHORT1FROMMP(psmh->mp1) == 1)
              /* something added to switch list */
           else
              /* something removed from switch list */
     }
     

Ed Blackman

...  Go ahead. 
Steal me. 
--- Blue Wave/Max v2.12 OS/2 [NR]
* Origin: The Federal Post -{*}- Spring-Lake, NC (1:3634/2)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 7877/2809
@PATH: 3634/2 151/1000 1002 3615/50 229/2 12/2442 711/409 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.