🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2508

How to make a window "selectable" from switchlist? (or otherwise)

#2508
From: Tom Hundt
Date: Thu, 04 Apr 1991 19:44
23 lines
1447 bytes
The problem:

I have a one-window program that uses a window created using
WinCreateWindow.  (Note: not WinCreateStdWindow, which creates a
frame window etc.)  I wanted to be able to receive keyboard
messages (so the thing would not *require* a mouse to use it). 
But, I can't seem to get the focus to be on my window.

I can't figure out how to *select* my window.  I added the
program to the switchlist (so that now, I can "End Task" it; this
required returning the window's handle in response to a
WM_QUERYFOCUSCHAIN message).  Trying to "switch to" the
application does nothing; whatever other window was last
selected, still is. 

According to the documentation, I should be getting WM_ACTIVATE,
WM_SETSELECTION, and WM_SETFOCUS messages, but I'm not.

Suggestions, anyone?  (One thing I'm going to try is creating an
invisible frame window, which might do whatever magical thing
necessary to receive these messages.)

-Tom Hundt
Technical Details
Message-ID: <1991Apr4.194459.19537@newross.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!newross!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!princeton!newross!news
From: hundt@samadams.princeton.edu (Tom Hundt)
Newsgroups: comp.os.os2.programmer
Subject: How to make a window "selectable" from switchlist? (or otherwise)
Message-ID: <1991Apr4.194459.19537@newross.Princeton.EDU>
Date: 4 Apr 91 19:44:59 GMT
Sender: news@newross.Princeton.EDU (USENET News System)
Organization: Princeton University (well, not really)
Lines: 23