How to get the value (string) of the current selection in a combobox

mfcvisual-c++visual-c++-6

How can I get the value (string) of the current selection in a combobox?

(Not the integer index)

Best Solution

There might be a better way (my MFC is a bit rusty), but it seems like you should be able to call CComboBox::GetLBText(), passing it the current selection using CComboBox::GetCurSel().

Related Question