+ wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
+ ,QWL_USER
+ );
+ wxWindowOS2* pWindow = NULL;
+ MRESULT rc = (MRESULT)0;
+ bool bProcessed = FALSE;
+ HPS hPS;
+ RECTL vRect;
+ RECTL vRect2;
+ RECTL vRect3;
+ double dPixelToRange = 0.0;
+ double dRange = 0.0;
+
+ switch (uMessage )
+ {
+ case WM_PAINT:
+ hPS = ::WinBeginPaint( hWnd
+ ,NULLHANDLE
+ ,&vRect
+ );
+ if(hPS)
+ {
+ ::WinQueryWindowRect(hWnd, &vRect);
+ ::GpiCreateLogColorTable( hPS
+ ,0L
+ ,LCOLF_CONSECRGB
+ ,0L
+ ,(LONG)wxTheColourDatabase->m_nSize
+ ,(PLONG)wxTheColourDatabase->m_palTable
+ );
+ ::GpiCreateLogColorTable( hPS
+ ,0L
+ ,LCOLF_RGB
+ ,0L
+ ,0L
+ ,NULL
+ );
+ //
+ // Draw the guage box
+ //
+ LONG lColor = 0x00FFFFFF; // White
+ POINTL vPoint = {vRect.xLeft + 1, vRect.yBottom + 1};
+
+ ::GpiSetColor(hPS, lColor);
+ ::GpiMove(hPS, &vPoint);
+ vPoint.x = vRect.xRight - 1;
+ ::GpiLine(hPS, &vPoint);
+ vPoint.y = vRect.yTop - 1;
+ ::GpiLine(hPS, &vPoint);
+ lColor = 0x000C0C0C; // Darkish Grey to give depth feel
+ ::GpiSetColor(hPS, lColor);
+ vPoint.x = vRect.xLeft + 1;
+ ::GpiLine(hPS, &vPoint);
+ vPoint.y = vRect.yBottom + 1;
+ ::GpiLine(hPS, &vPoint);
+ vRect3.xLeft = vRect.xLeft + 2;
+ vRect3.xRight = vRect.xRight - 2;
+ vRect3.yTop = vRect.yTop - 2;
+ vRect3.yBottom = vRect.yBottom + 2;