🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how to give program the focus?

#569
From: Michael Harris
Date: Thu, 30 Jul 1992 00:35
19 lines
1511 bytes
bergstro@src.honeywell.com (Pete Bergstrom) writes:

>This may be a relatively easy answer, but I want to capture mouse button
>clicks on my window.  I've done this by processing WM_BUTTON1DOWN and
>I do get the coordinates I want.

>But, when I do this, the title bar for my window loses the focus
>(grays out).  When this happens, I can't use ALT-F, etc key
>combinations to navigate the menus until I explicitly click on the
>title bar (or menu bar) again.

If you must process WM_BUTTON1DOWN, you should be sure to pass the message to
the default window proc.  You can do this either before or after your
processing.  I would suggest that you make a call to WinDefWindowProc() before
you do your processing in the case statement.
______________________________________________________________________________
     Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
 System Administrator, Computer & Technologies Theme Program, NC State Univ.
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
Technical Details
Message-ID: <harris.712456535@garfield.catt.ncsu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!taco!garfield.catt.ncsu.edu!harris
References: <9207292038.AA20166@data.src.honeywell.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!taco!garfield.catt.ncsu.edu!harris
From: harris@garfield.catt.ncsu.edu (Michael Harris)
Subject: Re: how to give program the focus?
Message-ID: <harris.712456535@garfield.catt.ncsu.edu>
Sender: news@ncsu.edu (USENET News System)
Organization: North Carolina State University
References: <9207292038.AA20166@data.src.honeywell.com>
Date: Thu, 30 Jul 1992 00:35:35 GMT
Lines: 19