]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/gauge.cpp
using new API (no visual difference)
[wxWidgets.git] / src / os2 / gauge.cpp
index 0cedb8047f69f8715b0646eb61d49c0d9797da82..972246d597264d076c98d27c67d3de6cd30ab49f 100644 (file)
@@ -37,9 +37,6 @@ MRESULT EXPENTRY wxGaugeWndProc(
     wxGauge*                        pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
                                                                               ,QWL_USER
                                                                              );
     wxGauge*                        pGauge = (wxGauge *)::WinQueryWindowULong( hWnd
                                                                               ,QWL_USER
                                                                              );
-    wxWindowOS2*                    pWindow = NULL;
-    MRESULT                         rc = (MRESULT)0;
-    bool                            bProcessed = FALSE;
     HPS                             hPS;
     RECTL                           vRect;
     RECTL                           vRect2;
     HPS                             hPS;
     RECTL                           vRect;
     RECTL                           vRect2;
@@ -157,8 +154,8 @@ bool wxGauge::Create(
 #endif
     if (pParent)
         pParent->AddChild(this);
 #endif
     if (pParent)
         pParent->AddChild(this);
-    m_backgroundColour.Set(wxString("LIGHT GREY"));
-    m_foregroundColour.Set(wxString("NAVY"));
+    m_backgroundColour.Set(wxString(wxT("LIGHT GREY")));
+    m_foregroundColour.Set(wxString(wxT("NAVY")));
 
     m_nRangeMax   = nRange;
     m_nGaugePos   = 0;
 
     m_nRangeMax   = nRange;
     m_nGaugePos   = 0;
@@ -217,6 +214,8 @@ bool wxGauge::Create(
             ,nWidth
             ,nHeight
            );
             ,nWidth
             ,nHeight
            );
+    m_nWidth  = nWidth;     // Save for GetBestSize
+    m_nHeight = nHeight;
     ::WinShowWindow((HWND)GetHWND(), TRUE);
     delete pTextFont;
     return TRUE;
     ::WinShowWindow((HWND)GetHWND(), TRUE);
     delete pTextFont;
     return TRUE;
@@ -307,4 +306,7 @@ void wxGauge::SetValue(
     ::WinInvalidateRect(GetHwnd(), &vRect, FALSE);
 } // end of wxGauge::SetValue
 
     ::WinInvalidateRect(GetHwnd(), &vRect, FALSE);
 } // end of wxGauge::SetValue
 
-
+wxSize wxGauge::DoGetBestSize() const
+{
+    return wxSize(m_nWidth,m_nHeight);
+}