X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c20e8f816b21b911e3a8ed8197c21df6ce726d6..f5766910b6731eb03e82371416e9778203396ce7:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 2db19422f6..c41347074c 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -2641,6 +2641,7 @@ MRESULT wxWindowOS2::OS2WindowProc( WXUINT uMsg, } break; + case CBN_LBSELECT: case BN_CLICKED: // Dups as LN_SELECT and CBN_LBSELECT { HWND hWnd = ::WinWindowFromID((HWND)GetHwnd(), SHORT1FROMMP(wParam)); @@ -2697,11 +2698,19 @@ MRESULT wxWindowOS2::OS2WindowProc( WXUINT uMsg, ,(WXWORD)SHORT1FROMMP(wParam) ); } + if (pWin->IsKindOf(CLASSINFO(wxChoice))) + { + wxChoice* pChoice = wxDynamicCast(pWin, wxChoice); + + pChoice->OS2Command( (WXUINT)SHORT2FROMMP(wParam) + ,(WXWORD)SHORT1FROMMP(wParam) + ); + } return 0; } // break; - case LN_ENTER: /* dups as CBN_EFCHANGE */ + case LN_ENTER: { HWND hWnd = HWNDFROMMP(lParam); wxWindowOS2* pWin = wxFindWinFromHandle(hWnd); @@ -3568,15 +3577,10 @@ bool wxWindowOS2::HandlePaint() wxLogLastError(wxT("CreateRectRgn")); return false; } - // Get all the rectangles from the region, convert the individual // rectangles to "the other" coordinate system and reassemble a // region from the rectangles, to be feed into m_updateRegion. // - // FIXME: This is a bad hack since OS/2 API specifies that rectangles - // passed into GpiSetRegion must not have Bottom > Top, - // however, at first sight, it _seems_ to work nonetheless. - // RGNRECT vRgnData; PRECTL pUpdateRects = NULL; vRgnData.ulDirection = RECTDIR_LFRT_TOPBOT; @@ -3606,14 +3610,13 @@ bool wxWindowOS2::HandlePaint() { int rectHeight; rectHeight = pUpdateRects[i].yTop - pUpdateRects[i].yBottom; - pUpdateRects[i].yTop = height - pUpdateRects[i].yTop; - pUpdateRects[i].yBottom = pUpdateRects[i].yTop + rectHeight; + pUpdateRects[i].yBottom = height - pUpdateRects[i].yTop; + pUpdateRects[i].yTop = pUpdateRects[i].yBottom + rectHeight; } ::GpiSetRegion(hPS, hRgn, vRgnData.crc, pUpdateRects); delete [] pUpdateRects; } } - m_updateRegion = wxRegion(hRgn, hPS); vEvent.SetEventObject(this);