CB_SELECTSTRING related question
-
Hello everybody, i am having a combobox (created through resource), and through code, i am updating the combobox with a list. for example, i am filling with "Kir" and "K". if i use CB_SELECTSTRING to select "K", its always selecting "Kir". if i use "Kj" in place of "K", then the selection between "Kir" and "Kj" is fine. from msdn definition : It selects the first list item, if any, that begins with the characters in the specified text. is there any other method to solve this issue? iam trying like this. SendMessage(hList, CB_SELECTSTRING , -1,(LPARAM)(LPCSTR)tt.c_str()); Thanks in Advance, A. Gopinath.
-
Hello everybody, i am having a combobox (created through resource), and through code, i am updating the combobox with a list. for example, i am filling with "Kir" and "K". if i use CB_SELECTSTRING to select "K", its always selecting "Kir". if i use "Kj" in place of "K", then the selection between "Kir" and "Kj" is fine. from msdn definition : It selects the first list item, if any, that begins with the characters in the specified text. is there any other method to solve this issue? iam trying like this. SendMessage(hList, CB_SELECTSTRING , -1,(LPARAM)(LPCSTR)tt.c_str()); Thanks in Advance, A. Gopinath.
Try to use the result of
CB_FINDSTRINGEXACT
forCB_SETCURSEL
:)They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
Try to use the result of
CB_FINDSTRINGEXACT
forCB_SETCURSEL
:)They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
Hello, sorry, i forgot to add that, i tried this also. CB_FINDSTRINGEXACT also returns the same issue. Thanks, A. Gopinath.
It should return a zero-based index... :)
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)
-
It should return a zero-based index... :)
They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)