UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam);
+
+ case CB_SETCURSEL:
+ // Selection was set with SetSelection. Update the value too.
+ if ((int)wParam > GetCount())
+ m_value = wxEmptyString;
+ else
+ m_value = GetString(wParam);
+ break;
+
}
return wxChoice::MSWWindowProc(nMsg, wParam, lParam);
// want the new one)
if ( sel == -1 )
{
- m_value = GetValue();
+ m_value = wxGetWindowText(GetHwnd());
}
else // we're synthesizing text updated event from sel change
{
else
SetWindowText(GetHwnd(), value.c_str());
+ m_value = value;
m_selectionOld = GetSelection();
}