]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
don't set cursor for not realized (and not only hidden) windows
[wxWidgets.git] / src / msw / combobox.cpp
index 41b73b447894ab39d9ed317dbd9c2d72aa572da1..6b3ec7f57fb63ccd237e604e387aee624ee458c8 100644 (file)
@@ -321,6 +321,12 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
             // CBN_EDITCHANGE below
             sel = GetSelection();
             value = GetStringSelection();
+
+            // this string is going to become the new combobox value soon but
+            // we need it to be done right now, otherwise the event handler
+            // could get a wrong value when it calls our GetValue()
+            ::SetWindowText(GetHwnd(), value);
+
             {
                 wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId());
                 event.SetInt(sel);
@@ -411,8 +417,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     // edit control, we must subclass it as well
     if ( !(style & wxCB_READONLY) )
     {
-        gs_wndprocEdit = wxSetWindowProc((HWND)GetEditHWND(),
-                                         wxComboEditWndProc);
+        gs_wndprocEdit = wxSetWindowProc((HWND)GetEditHWND(), wxComboEditWndProc);
     }
 
     // and finally, show the control