🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #57

Re: Questions, round two...

#57
From: Kenneth Blackler
Date: Fri, 24 Jul 1992 15:52
35 lines
1939 bytes
In <9207221520.AA05939@ucbvax.Berkeley.EDU> ngorelic@MUSETTE.CR.USGS.GOV (Noel S. Gorelick) writes:

>Since I got such great response from the first set of questions,
>I'll try my luck with round number two:

>How does one cause a static window to respond to input?  I have a
>fairly complex arrangement of static windows that I want to be able
>to click on and get a response from...  Straight subclassing doesn't
>work.  The subclass procedure never even gets called for the mouse
>events.

>(Somewhere in the Petzold book, he says that statics trap the
>NCHITTEST message to disable mouse events.  Where and how do I
>re-enable them?)

>(Email, please, our news server just bit the dust)

>Noel (ngorelic@musette.cr.usgs.gov)

A quick way is to create each static control using CreateWindowEx
which by default means your window DOESN'T have the
WS_EX_NOPARENTNOTIFY style.
Your dialog box therefore will receive WM_PARENTNOTIFY messages
and you can process these to tell you which control is pressed
in (only those created this way and added to the dialog box
will generate the message). It will even tell you the (x,y)
position 8-)
Ken B.
-- 
 ______________________________________   ____________   _____________
|Ken Blackler kb@jet.uk (+44)235 464743| | __________ | |   -Fusion-   |
|JET Joint Undertaking, Abingdon       | |   | |_ |   | |Energy for the|
|Oxfordshire, England. OX14 3EA        | | \_/ |_ |   | | (far) future |
- Disclaimer: Please note that the above is a personal view and should not 
  be construed as an official comment from the JET project.
Technical Details
Message-ID: <1992Jul24.155220.13103@jet.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!jet!kb
References: <9207221520.AA05939@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!jet!kb
From: kb@jet.uk (Kenneth Blackler)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Questions, round two...
Message-ID: <1992Jul24.155220.13103@jet.uk>
Date: 24 Jul 92 15:52:20 GMT
References: <9207221520.AA05939@ucbvax.Berkeley.EDU>
Organization: Joint European Torus
Lines: 35