void MyFrame::OnComboSelected(wxCommandEvent& event) { int selection = event.GetSelection(); // use the selection index to do something with the selected item }
void MyFrame::OnListSelected(wxCommandEvent& event) { int selection = event.GetSelection(); // use the selection index to do something with the selected item }These examples use the wxWidgets library, which is a cross-platform GUI toolkit for C++.