Re: Previous control

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mike777 wrote:
> 
> Mike777 wrote:
> > 
> > CChris wrote:
> > > 
> > > Mike777 wrote:
> > > > 
> > > > CChris wrote:
> > > > > 
> > > > > Mike777 wrote:
> > > > > > 
> > > > > > I suppose the edit boxes and combo boxes don't really have a Click
> > > > > > event,
> > so</font></i>
> > > > > > I'm supposed to use a different event for w32HGetHandler.  
> > > > > > 
> > > > > > Any guidance would be appreciated.
> > > > > > 
> > > > > > Thanks
> > > > > > 
> > > > > > Mike
> > > > > 
> > > > > Why not simply add an w32HGotFocus event handler to all the controls
> > > > > you
> are</font></i>
> > > > > interested in?
> > > > > The common handler would save in a variable you define the id of the
> > > > > control
> > > > > for which it is called (or stack them if you need more), and then you
> > > > > retrieve
> > > > > them.
> > > > > Doesn't work?
> > > > 
> > > > Almost.  w32HGotFocus doesn't fire when the mouse is clicked into a
> > > > combobox.
> > > >  I tried w32HEvent, but then just passing the mouse over the control
> > > >  activates
> > > > the event procedure, undoing what I've done by clicking in the cbo.
> > > > 
> > > > It works for Text Boxes, Radio Buttons and Check Boxes.
> > > > 
> > > > Is there a substitute for w32HGotFocus that works on combo boxes?  [Yes,
> > > > I've
> > > > looked but I haven't found one, yet.]
> > > > 
> > > > Mike
> > > 
> > > I didn't have time to check (busy documenting sets.e and adding more
> > > tests,
> > > and I certainly type 10x slower than Jeremy). I don't see why combo boxes
> > > wouldn't
> > > fire w32HGotFocus. If I can confirm this I'll fix it, Bill forbid.
> 
> I have a workaround.  For those controls that have a GotFocus event, as per
> your suggestion.  For those that don't, params[1]=273 seems to execute only
> once when the control is selected with the mouse, so I added the w32HEvent but
> filtered on params[1]=273.
> 
> Seems to work for now.
> 
> I attempted to find someplace which would identify the parameter codes (and
> the other parameters, for that matter) to no avail.  So, for now, it was trial
> and error (thank you pretty_print) and search for a code that occurs exactly
> once each time a control is selected.
> 
> Not at all elegant, but functional.
> 
> Mike

The list is called winuser.h, and it is fairly easy to get.

There are holes in that list, and I found other references that were filling
some of the holes. I'm not sure, however, whether these messages are very
helpful:
* some come from older versions of Windows (typically WM_TESTING or
WM_COMPACTING)
* some are probably specific to Wine, Windows CE or such variants
* and for some I don't have a clue (like WM_SIZEWAIT).

This one is not bad:
http://wiki.winprog.org/wiki/Windows_messages
but it has holes too. Some other pages do fill these gaps, but then not the
others.
There is no such list on MSDN - shame on them!

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu