Auto Complete Combo box
-
Hello all - I need to implement a full featured auto complete combo box just like what it is in internet explorer. Thanks to a lot of help available on codeproject, I implemented the basic features. But there is one bug which is driving me mad. The details: I have handled CBN_EDITCHANGE message here. and I let it be handled by the parent also using the ON_CONTROL_REFLECT_EX method. The idea is that I store the original combo entries in a vector. When user types in something, on edit change, I get the string, if it matches, I modify the comob entries with the search entries found (As i already have the original combo entries with me) and then call the drop down method to show the search strings. When user closes the dropdown or expands it, I restore the original state of the combo box. similarly when the search string is empty, i restore the state again. Everything works fine, but when the dropdown is closed, and I try to enter a string, the combo box selects the first matched string in the combo (Which I do not want) Whereas if I expand the combo box, the string is not selected. I Guess this is too much. But still I hope someone has the answer. Thanks in advance Be the change you wish to see...
-
Hello all - I need to implement a full featured auto complete combo box just like what it is in internet explorer. Thanks to a lot of help available on codeproject, I implemented the basic features. But there is one bug which is driving me mad. The details: I have handled CBN_EDITCHANGE message here. and I let it be handled by the parent also using the ON_CONTROL_REFLECT_EX method. The idea is that I store the original combo entries in a vector. When user types in something, on edit change, I get the string, if it matches, I modify the comob entries with the search entries found (As i already have the original combo entries with me) and then call the drop down method to show the search strings. When user closes the dropdown or expands it, I restore the original state of the combo box. similarly when the search string is empty, i restore the state again. Everything works fine, but when the dropdown is closed, and I try to enter a string, the combo box selects the first matched string in the combo (Which I do not want) Whereas if I expand the combo box, the string is not selected. I Guess this is too much. But still I hope someone has the answer. Thanks in advance Be the change you wish to see...
It seems more information is needed in order to answer this, since there is no specific question. You want to know why your code doesn't work but you haven't given us all the information required to answer it. Perhaps showing the code that is relevant will help us catch something.