Improved size handling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2006-01-04 22:37:54 +00:00
parent a917d2149e
commit 713d144145
2 changed files with 10 additions and 1 deletions

View File

@@ -68,6 +68,10 @@ public:
protected:
int m_nRangeMax;
int m_nGaugePos;
int m_nWidth;
int m_nHeight;
wxSize wxGauge::DoGetBestSize(void) const;
private:
DECLARE_DYNAMIC_CLASS(wxGauge)

View File

@@ -214,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;
@@ -304,4 +306,7 @@ void wxGauge::SetValue(
::WinInvalidateRect(GetHwnd(), &vRect, FALSE);
} // end of wxGauge::SetValue
wxSize wxGauge::DoGetBestSize() const
{
return wxSize(m_nWidth,m_nHeight);
}