]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
generate key events for Space/Enter in addition to the activate events, as wxMSW...
[wxWidgets.git] / src / msw / combobox.cpp
index e8bfc1b6d563b866f978398e0b6efc8067dc2cf9..0e81ed856a2c3f3254328a59bb2a7c39c2625957 100644 (file)
@@ -114,7 +114,6 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
             }
             break;
 
-#if 0
         case WM_GETDLGCODE:
             {
                 wxCHECK_MSG( win, 0, _T("should have a parent") );
@@ -126,7 +125,6 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
                 }
             }
             break;
-#endif // 0
 
         // deal with tooltips here
 #if wxUSE_TOOLTIPS && defined(TTN_NEEDTEXT)
@@ -306,6 +304,11 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                         const wxValidator& validator,
                         const wxString& name)
 {
+    // pretend that wxComboBox is hidden while it is positioned and resized and
+    // show it only right before leaving this method because otherwise there is
+    // some noticeable flicker while the control rearranges itself
+    m_isShown = FALSE;
+
     // first create wxWin object
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
         return FALSE;
@@ -362,6 +365,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
                                       );
     }
 
+    // and finally, show the control
+    Show(TRUE);
+
     return TRUE;
 }