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

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


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

(Not the integer index)


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().