+ ::GpiSetPS(hPS, &vSize, PU_PELS | GPIF_DEFAULT);
+ ::WinQueryWindowRect((HWND)GetHwnd(), &vRect);
+ ::WinFillRect(hPS, &vRect, GetBackgroundColour().GetPixel());
+} // end of wxControl::OnEraseBackground
+
+WXDWORD wxControl::GetExStyle(
+ WXDWORD& rStyle
+) const
+{
+ //
+ // Meaningless under OS/2, just return what was sent
+ //
+ WXDWORD exStyle = rStyle;
+
+ return exStyle;
+} // end of wxControl::GetExStyle
+
+// ---------------------------------------------------------------------------
+// global functions
+// ---------------------------------------------------------------------------
+
+// Call this repeatedly for several wnds to find the overall size
+// of the widget.
+// Call it initially with -1 for all values in rect.
+// Keep calling for other widgets, and rect will be modified
+// to calculate largest bounding rectangle.
+void wxFindMaxSize(
+ WXHWND hWnd
+, RECT* pRect
+)
+{
+ int nLeft = pRect->xLeft;
+ int nRight = pRect->xRight;
+ int nTop = pRect->yTop;
+ int nBottom = pRect->yBottom;
+
+ ::WinQueryWindowRect((HWND)hWnd, pRect);
+
+ if (nLeft < 0)
+ return;
+
+ if (nLeft < pRect->xLeft)
+ pRect->xLeft = nLeft;
+
+ if (nRight > pRect->xRight)
+ pRect->xRight = nRight;
+
+ if (nTop < pRect->yTop)
+ pRect->yTop = nTop;
+
+ if (nBottom > pRect->yBottom)
+ pRect->yBottom = nBottom;
+} // end of wxFindMaxSize