}
else
{
- wxButton* pBtn = wxDynamicCast( GetDefaultItem()
- ,wxButton
- );
+ wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
+ wxButton* pBtn = NULL;
+
+ if (tlw)
+ {
+ pBtn = wxDynamicCast(tlw->GetDefaultItem(), wxButton);
+ }
if (pBtn && pBtn->IsEnabled())
{
}
break;
+ case CBN_LBSELECT:
case BN_CLICKED: // Dups as LN_SELECT and CBN_LBSELECT
{
HWND hWnd = ::WinWindowFromID((HWND)GetHwnd(), SHORT1FROMMP(wParam));
,(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);
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;
{
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);