]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Use the black pen for the border on Windows now too.
[wxWidgets.git] / src / msw / combobox.cpp
index fafda5dd76996655adddea010c129dfdabb31d64..c5368a57d1d3bbc753c99dca88ac1cf640a9f465 100644 (file)
@@ -41,7 +41,7 @@
 #include "wx/msw/private.h"
 
 #if wxUSE_TOOLTIPS
-    #ifndef __GNUWIN32_OLD__
+    #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__)
         #include <commctrl.h>
     #endif
     #include "wx/tooltip.h"
@@ -115,7 +115,7 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
 #endif // 0
 
         // deal with tooltips here
-#if wxUSE_TOOLTIPS
+#if wxUSE_TOOLTIPS && defined(TTN_NEEDTEXT)
         case WM_NOTIFY:
             {
                 wxCHECK_MSG( win, 0, _T("should have a parent") );
@@ -230,11 +230,13 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
 
         case CBN_EDITCHANGE:
             {
+                wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
                 // if sel != -1, value was initialized above (and we can't use
                 // GetValue() here as it would return the old selection and we
                 // want the new one)
-                wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
-                event.SetString(sel == -1 ? GetValue() : value);
+                if ( sel == -1 )
+                    value = GetValue();
+                event.SetString(value);
                 event.SetEventObject(this);
                 ProcessCommand(event);
             }