Re: Getting Combo Box Drop Down Button hWnd?

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

Lewis Townsend wrote:
> 
> Al Getz wrote:
> > 
> > jacques deschĂȘnes wrote:
> > > 
> > > 
> > > Hi,
> > > Guessing again!
> > > What about if the drop down button is not really a control but a drawing
> > > in the
> > > edit control client area.  In that case the edit wndproc test for the
> > > location of the
> > > 
> > > WM_LBUTTONDOWN  and if it got a hit on the button area, it redraw it and
> > > act
> > > accordingly. A way to test would be to subclass the edit control and block
> > >
> > > the passing of WM_LBUTTONDOWN to the default edit wndproc
> > > 
> > > regards,
> > > Jacques DeschĂȘnes
> > > 
> > 
> > Hi Jacques,
> > 
> > Very good idea, and it does in fact work, but that's what i've been
> > doing for debug purposes (to verify the hWnd does exist and what it
> > really is at run time).  The problem is, there's no way to force the
> > button to generate a WM_LBUTTONUP (actually what i really trap) or
> > WM_LBUTTONDOWN without the user taking part.  Apparently, the only
> > way to get that to give the correct hWnd is to have someone move the
> > mouse over the button and click it at least once, which triggers a
> > WM_LBUTTONx which of course passes the correct hWnd which can then
> > be logged and used like any other hWnd.  This of course wont be
> > acceptable so i need another way.
> > I'd hate to have to programmatically move the mouse and click the
> > button just to generate the message so i can trap all the combobox
> > button hWnd's to every single combobox (w/dropdown) hee hee.  It 
> > would be funny however, especially if we had the mouse move at near
> > human speed so the user would watch this taking place every time they
> > open up their program smile
> > 
> > Keep the ideas coming and i'll keep trying them...
> > 
> > 
> > Thanks and take care,
> > Al
> > 
> > And, good luck with your Euphoria programming!
> > 
> > My bumper sticker: "I brake for LED's"
> > 
> 
> Disclaimer:
> I don't really know anything about this stuff but I had an idea 
> when reading this last post. And, you seem to be grasping for
> sraws here so here's my idea.
> 
> Instead of programatically moving the mouse to click the button
> could you set_focus to the parent control (the combo-box I guess)
> and pass a keyboard event such as Enter or Space or Down_Arrow ?
> 
> ======
> Lewy T
> <a
> href="http://rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=Townsend">http://rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=Townsend</a>
> 

Hi Lewis,

That's an interesting idea and i will most likely try it at some point,
but im wondering now if it will be possible in the whole time frame of
things.  That is, i'll have to setfocus and call some action key to get
the button 'pressed' (which might work), and that's just fine (im guessing),
but the problem im wondering about is this:
The time frame is during the creation of the ComboBox, and i'd like
to have the task completed before the Create() call returns so that the
next combobox (if any) to be created can be processed properly.  What
im not sure of at this point is if the message will be processed that
quickly, and i dont think it will be because the program doesnt enter
it's message loop until AFTER all the controls (or at least most)
are created.  There might be a way around this but i think it would
take some thought, but if i cant find a more direct way i'll be coming
back to this idea so thanks for the suggestion.
Whatever happens i'll post something here.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

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

Search



Quick Links

User menu

Not signed in.

Misc Menu