X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b17d2e361e22202f7c1be6e0babcc261261d686..a76342da418c75ead546ce2025db24dad261d237:/src/msw/choice.cpp diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index e75bef72bd..6abcdaef9a 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -179,8 +179,9 @@ bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg) { MSG *msg = (MSG *) pMsg; - // don't preprocess "ESC" if combobox is dropped down - if ( msg->message == WM_KEYDOWN && msg->wParam == VK_ESCAPE ) + // if the dropdown list is visible, don't preprocess certain keys + if ( msg->message == WM_KEYDOWN + && (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) ) { if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0)) { @@ -457,7 +458,7 @@ void wxChoice::DoGetSize(int *w, int *h) const // total height of the control including the drop down list -- but only // sometimes, and normally it isn't... I have no idea about what to do with // this - wxControl::DoGetSize(w, h); + wxControl::DoGetSize(w, h); } void wxChoice::DoSetSize(int x, int y, @@ -486,6 +487,11 @@ void wxChoice::DoSetSize(int x, int y, wxControl::DoSetSize(x, y, width, height, sizeFlags); + // I'm commenting this out since the code appears to make choices + // and comboxes too high when they have associated sizers. I'm sure this + // is not the end of the story, which is why I'm leaving it #if'ed out for + // now. JACS. +#if 0 // if the height specified for the visible part of the control is // different from the current one, we need to change it separately // as it is not affected by normal WM_SETSIZE @@ -498,6 +504,9 @@ void wxChoice::DoSetSize(int x, int y, SendMessage(GetHwnd(), CB_SETITEMHEIGHT, (WPARAM)-1, h + delta); } } +#else + wxUnusedVar(heightOrig); +#endif } wxSize wxChoice::DoGetBestSize() const