How to modify combo box displayed selection without changing available selections.
Posted on 2014-01-16
I have a dialog which contains a combo box.
The combo box has several items in its drop down list.
One item in the drop down list selects an option requiring the user to input a number.
If the user selects this item from the combo box drop down list, a modal pop up will read the number.
At this point, the combo box displays the text corresponding to the user's selection and the application has stored the number read from the pop up into a variable.
We want to change the the text displayed in the combo box selection to contain the number read from the popup WITH OUT changing the text in the drop down selections.
The question is:
Is there some method the C++ application can use to change the displayed combo box selection without modifying the text in the drop down text, just change the text displayed in the edit box area of the combo box?
I can use GetDlgItemText() to read combo box displayed selection, but SetDlgItemText() doesn't change the combo box display.
Being able to do this would keep the user informed of what option was chosen as well as display the value entered without disturbing possible future drop down list choices and would not require extra screen dialog space.
Thanks for your help.