Mestrez
asked on
How search an item in a ListCtrl like the Index of MSDN ???
I have made a MultiColumnComboBox with a combobox and a ListCtrl.
I would like to search item in my ListCtrl by sequence of one keys of my keyboard like the Index Search in MSDN.
I think i must use OnEditChange from My combobox to intercept the keydown character and after ...
Sorry for bad english.
Thanks a lot.
Pierre.
I would like to search item in my ListCtrl by sequence of one keys of my keyboard like the Index Search in MSDN.
I think i must use OnEditChange from My combobox to intercept the keydown character and after ...
Sorry for bad english.
Thanks a lot.
Pierre.
you have to be more specific
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have any more questions, please ask!
Laminamia :)
Laminamia :)
Sorry my answer is in Win32 API. When you capture the OnEditChange, get the string that has been input so far, and search the combo box with the CB_FINDSTRING message. It will search for a string that has the first matching characters as what the user has entered so far. CB_FINDSTRINGEXACT will find a string that matches perfectly. Both messages will return the index of the item in the list box. CB_ERR will be returned if no string has the first matching characters with what the user has entered. CB_SETCURSEL will scroll the index into view (in this case, send the index returned by CB_FINDSTRING) and select it.
Laminamia :)
Laminamia :)
ASKER
Thanks a lot.
To chat -> mestrez.pierre@usa.net
To chat -> mestrez.pierre@usa.net
What language do you speak, Mestrez?