X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc2d42090058bb7ebb9545b857a9a435ecbdd876..1d9fe50dc9ef6e605c04c1d01e064b3cc2769377:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 958d61a5d9..44fa9ad078 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -81,13 +81,14 @@ bool wxStatusBarGeneric::Create(wxWindow *parent, SetFont(*wxSMALL_FONT); #endif - // Set the height according to the font and the border size - wxClientDC dc(this); - dc.SetFont(GetFont()); - - wxCoord y; - dc.GetTextExtent(_T("X"), NULL, &y ); - + wxCoord y; + { + // Set the height according to the font and the border size + wxClientDC dc(this); + dc.SetFont(GetFont()); + + dc.GetTextExtent(_T("X"), NULL, &y ); + } int height = (int)( (11*y)/10 + 2*GetBorderY()); SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height); @@ -250,7 +251,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i) wxString text(GetStatusText(i)); - long x = 0, y = 0; + wxCoord x = 0, y = 0; dc.GetTextExtent(text, &x, &y);