]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Don't handle WM_PRINTCLIENT anymore, manually draw the static box label background...
[wxWidgets.git] / src / msw / combobox.cpp
index 2648bd802455fccd4cdc86455c78684e06acfcad..25a2c9cd672550027b7bd64b0d87f99fe942099d 100644 (file)
 #include "wx/clipbrd.h"
 #include "wx/msw/private.h"
 
+// include <commctrl.h> "properly"
+#include "wx/msw/wrapcctl.h"
+
 #if wxUSE_TOOLTIPS
-    #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
-        #include <commctrl.h>
-    #endif
     #include "wx/tooltip.h"
 #endif // wxUSE_TOOLTIPS
 
@@ -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);