ComboBox - Finding out if it has the cursor

Windows specific forum
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

ComboBox - Finding out if it has the cursor

Post by RichardL »

Code: Select all

GadgetNumber.l = GetDlgCtrlID_(GetFocus_())
This snippet returns the gadget number that has the focus, for StringGadgets.

In my current job I want to replace a StringGadget with a ComboBox with several pre-canned reponses that the user can accept or accept and edit.

However, I no longer get the correct Gadget number returned... any suggestions?

Thanks in advance
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

Sorted...

Code: Select all

If  GetFocus_() = GetWindow_(GadgetID(#ComboGadget),#GW_CHILD) 
x
x
EndIf
The window area is a child of the combobox.

RichardL
Post Reply