Is it possible to set the edit text portion of a combo box programmaticall y? I'm not processing any user entered text.
I'm using C and WinAPI only - no MFC or stuff like that.
Stuff I've tried that doesn't work
If that isn't possible, can I limit the number of strings displayed in the dropdown so that I can add the "display" text to the end of the list and just use
Thanks in advance
I'm using C and WinAPI only - no MFC or stuff like that.
Code:
hndCombo = CreateWindow(...,
WS_CHILD | WS_VISIBLE | WS_TAPSTOP |
CBS_HASSTRINGS | CBS_DROPDOWNLIST,
...);
Code:
SetWindowText(hndCombo, ...); SetDlgItemText(parent, id_combo, ...); SendMessage(hndCombo, WM_SETTEXT, 0, (LPARAM)...);
Code:
drop down list "option 1" "option 2" "option 3" stop showing here "display text but invisible to user" SendMessage(hndCombo, CB_SETCURSEL, 3, 0);