X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abc886c577e1a8510806eff8929c5344210db12d..cf6e951cf203ace5f8cffb91ece08f18f23ccac2:/src/msw/combobox.cpp diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index bb325725ce..0e81ed856a 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -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) @@ -269,17 +267,11 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) event.SetString(value); event.SetEventObject(this); - return ProcessCommand(event); + ProcessCommand(event); } break; } - // I don't think the following should be true. The return value is - // whether the event has been handled, not the status of the handling. - // So, we only return false if the switch fell through. This will - // resolve the same event being sent multiple times by MS Windows. - // mea 05-22-01 - // there is no return value for the CBN_ notifications, so always return // FALSE from here to pass the message to DefWindowProc() return FALSE; @@ -312,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; @@ -368,6 +365,9 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, ); } + // and finally, show the control + Show(TRUE); + return TRUE; }