How do you detect when a user presses enter in a combo box? I'm sure there must be a way, but I can't find anything on it in the API and subclassing didn't seem to work. Can anyone help me?
Posted on 2001-01-04 19:40:00 by Racso
Subclassing should work fine but remember for combo boxes that you can edit you have to subclass the edit box within the combo box and not the combo box it self.
Posted on 2001-01-04 22:45:00 by Varunun
So how do you find the handle of the edit control in a combo box?
Posted on 2001-01-04 23:44:00 by Racso
The edit box is the child of the combo box so either use GetWindow with the combo box handle and the GW_CHILD flag or use FindWindowEx using the combo box handle as the parent and search for the Edit class.
Posted on 2001-01-05 00:27:00 by Varunun