X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b720b24da89b6b60dbabde36f2a995357e3b1497..8b4457965a0c0d0ef828dbf7cca3d2f947083054:/src/os2/gauge.cpp diff --git a/src/os2/gauge.cpp b/src/os2/gauge.cpp index 05685686b1..972246d597 100644 --- a/src/os2/gauge.cpp +++ b/src/os2/gauge.cpp @@ -37,9 +37,6 @@ MRESULT EXPENTRY wxGaugeWndProc( wxGauge* pGauge = (wxGauge *)::WinQueryWindowULong( hWnd ,QWL_USER ); - wxWindowOS2* pWindow = NULL; - MRESULT rc = (MRESULT)0; - bool bProcessed = FALSE; HPS hPS; RECTL vRect; RECTL vRect2; @@ -140,9 +137,7 @@ bool wxGauge::Create( , const wxPoint& rPos , const wxSize& rSize , long lStyle -#if wxUSE_VALIDATORS , const wxValidator& rValidator -#endif , const wxString& rsName ) { @@ -159,8 +154,8 @@ bool wxGauge::Create( #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; @@ -219,6 +214,8 @@ bool wxGauge::Create( ,nWidth ,nHeight ); + m_nWidth = nWidth; // Save for GetBestSize + m_nHeight = nHeight; ::WinShowWindow((HWND)GetHWND(), TRUE); delete pTextFont; return TRUE; @@ -309,4 +306,7 @@ void wxGauge::SetValue( ::WinInvalidateRect(GetHwnd(), &vRect, FALSE); } // end of wxGauge::SetValue - +wxSize wxGauge::DoGetBestSize() const +{ + return wxSize(m_nWidth,m_nHeight); +}