🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sensing focus in a dialog box

#3478
From: Mike Leibensperger
Date: Fri, 28 Jun 1991 18:03
26 lines
1717 bytes
In article <1991Jun25.210210.3046@beaver.cs.washington.edu> goble@cs.washington.edu (Brian Goble) writes:
>I have a dialog box with a bunch of edit windows (single-line).  
>When the user enters info into the first edit box and then tabs to
>the next edit box I want to know that something is in that first
>edit box and use it to load in some other info.

When your edit control loses focus, it gets a WM_KILLFOCUS message.
(Likewise, a window receiving the focus gets WM_SETFOCUS.)  You can
capture WM_KILLFOCUS, check the data typed into the edit control, and
do whatever's appropriate---send messages to other windows, keep the
focus using SetFocus() if the data is invalid, etc.  You'll need to
subclass the edit control to do this.

At least, I *think* that's how it's supposed to work....

Press on....

>
>Brian Goble	|	goble@wolf.cs.washington.edu


--
Michael J. Leibensperger <mjl@locus.com>       "None are so deeply enslaved
Locus Computing Corp./Boston			as those who falsely believe
25 Burlington Mall Road				they are free."
Burlington MA 01803, (617)229-4980 x169			-- J. W. von Goethe
Technical Details
Message-ID: <25836@oolong.la.locus.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!prodnet.la.locus.com!lccma.bos.locus.com!mjl
References: <1991Jun25.210210.3046@beaver.cs.washington.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!turnkey!orchard.la.locus.com!prodnet.la.locus.com!lccma.bos.locus.com!mjl
From: mjl@lccma.bos.locus.com (Mike Leibensperger)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Sensing focus in a dialog box
Summary: How about subclassing the edit window and watching for WM_KILLFOCUS?
Message-ID: <25836@oolong.la.locus.com>
Date: 28 Jun 91 18:03:26 GMT
References: <1991Jun25.210210.3046@beaver.cs.washington.edu>
Sender: news@locus.com
Organization: Locus Computing Corp --- Boston office
Lines: 26