Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing Keyboard Input

Status
Not open for further replies.

rdn2113

Programmer
Sep 15, 2004
1
US
I need to capture keyboard input when the input focus is set to a CCombobox control. What's the best approach to doing this?

Thanks!

Rick
 
Capture the KeyPress Event of the CComboBox ?

or the OnLoseFocus() event, adn just parse the data that has been entered.

The best method depends on knowing what u want to do (capture a string, or each char. and if so, why)
 
Use PreTranslateMessage(), check the params to see if the control to get the message is actually the ID of your combobox. if so, get the actual message, check to see if it's a keydown or char message, and do the appropriate coding.

bdiamond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top