[comp.os.os2.programmer] How to make a window "selectable" from switchlist?

hundt@samadams.princeton.edu (Tom Hundt) (04/05/91)

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