+ if (pGauge->GetWindowStyleFlag() & wxGA_VERTICAL)
+ {
+ dRange = (double)(vRect3.yTop - vRect3.yBottom);
+ dPixelToRange = dRange/(double)pGauge->GetRange();
+ vRect2.yTop = (int)(pGauge->GetValue() * dPixelToRange);
+ vRect2.yBottom = vRect3.yBottom;
+ vRect2.xLeft = vRect3.xLeft;
+ vRect2.xRight = vRect3.xRight;
+ vRect3.yBottom = vRect2.yTop;
+ if (vRect3.yBottom <= 1)
+ vRect3.yBottom = 2;
+ ::WinFillRect(hPS, &vRect3, pGauge->GetBackgroundColour().GetPixel());
+ ::WinFillRect(hPS, &vRect2, pGauge->GetForegroundColour().GetPixel());
+ }
+ else
+ {
+ dRange = (double)(vRect3.xRight - vRect3.xLeft);
+ dPixelToRange = dRange/(double)pGauge->GetRange();
+ vRect2.yTop = vRect3.yTop;
+ vRect2.yBottom = vRect3.yBottom;
+ vRect2.xLeft = vRect3.xLeft;
+ vRect2.xRight = (int)(pGauge->GetValue() * dPixelToRange);
+ vRect3.xLeft = vRect2.xRight;
+ if (vRect3.xLeft <= 1)
+ vRect3.xLeft = 2;
+ ::WinFillRect(hPS, &vRect3, pGauge->GetBackgroundColour().GetPixel());
+ ::WinFillRect(hPS, &vRect2, pGauge->GetForegroundColour().GetPixel());
+ }
+ ::WinEndPaint(hPS);
+ }
+ }
+ return (fnWndProcGauge( hWnd
+ ,(ULONG)uMessage
+ ,(MPARAM)wParam
+ ,(MPARAM)lParam
+ )
+ );
+} // end of wxGaugeWndProc
+
+bool wxGauge::Create(
+ wxWindowOS2* pParent
+, wxWindowID vId
+, int nRange
+, const wxPoint& rPos
+, const wxSize& rSize
+, long lStyle
+, const wxValidator& rValidator
+, const wxString& rsName
+)
+{
+ int nX = rPos.x;
+ int nY = rPos.y;
+ int nWidth = rSize.x;
+ int nHeight = rSize.y;
+ long lMsStyle = 0L;
+ SWP vSwp;
+
+ SetName(rsName);
+#if wxUSE_VALIDATORS
+ SetValidator(rValidator);
+#endif
+ if (pParent)
+ pParent->AddChild(this);
+ m_backgroundColour.Set(wxString("LIGHT GREY"));
+ m_foregroundColour.Set(wxString("NAVY"));