X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/66160760e1b333dd73f4c32cb6549bbc0461b67e..6c2cd2a2116c5eff1646e0acb7cad2c887300300:/src/msw/font.cpp?ds=sidebyside diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 8023ed0e3d..f2ff677d8a 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -476,13 +476,14 @@ int wxNativeFontInfo::GetPointSize() const // for printing! const int ppInch = ::GetDeviceCaps(ScreenHDC(), LOGPIXELSY); - return (int) (((72.0*(double)abs(lf.lfHeight)) / (double) ppInch) + 0.5); + // BC++ 2007 doesn't provide abs(long) overload, hence the cast + return (int) (((72.0*abs((int)lf.lfHeight)) / (double) ppInch) + 0.5); } wxSize wxNativeFontInfo::GetPixelSize() const { wxSize ret; - ret.SetHeight(lf.lfHeight); + ret.SetHeight(abs((int)lf.lfHeight)); ret.SetWidth(lf.lfWidth); return ret; } @@ -894,12 +895,12 @@ wxFont::~wxFont() // real implementation // ---------------------------------------------------------------------------- -wxObjectRefData *wxFont::CreateRefData() const +wxGDIRefData *wxFont::CreateGDIRefData() const { return new wxFontRefData(); } -wxObjectRefData *wxFont::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const { return new wxFontRefData(*wx_static_cast(const wxFontRefData *, data)); }