i have a string and if it's already in teh listbox, i dont want to put it in there again. isnt there a message you can send the listbox for it to search if a certain string is already in there? if so, what are the WPARAM and LPARAM of it? thanks!
This is a discussion on searching listbox for a string within the Windows Programming forums, part of the Platform Specific Boards category; i have a string and if it's already in teh listbox, i dont want to put it in there again. ...
i have a string and if it's already in teh listbox, i dont want to put it in there again. isnt there a message you can send the listbox for it to search if a certain string is already in there? if so, what are the WPARAM and LPARAM of it? thanks!
One solution is FindItem() and LVFINDINFO structure.
Kuphryn
Lookup the LB_FINDSTRING message...use it with SendMessage. Pass -1 for wParam and cast the string to find for lParam.
If the return is LB_ERR, then the string isnt in there and you can add it