I am tasked to do a real-time search using a edit box. When the text in the edit box matches the item in clistctrl, it will be highlighted. What I really want to do is highlight the matched item in Clistctrl on cedit box change.
Asked
Active
Viewed 463 times
1 Answers
0
The edit box send WM_COMMAND EN_CHANGE every time when you enter a character. So add a ON_ handler for this Event and perform your search.

xMRi
- 14,982
- 3
- 26
- 59
-
I am pretty new to mfc. Can you please show me a piece of code on how to do this? thanks in advance – Ralph De Guzman Aug 02 '14 at 07:06
-
The first step is to add a message handler for EN_CHANGE from the edit control. That is done with the IDE wizard, not by adding code. So start with a tutorial so you can learn how to add message handlers. – ScottMcP-MVP Aug 02 '14 at 13:12