X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ab8b6ddfa26fbabeadad36966a21a42fe649b1..c1a4ce66a6d0f5830bd80573963dc072f81e6813:/src/msw/dc.cpp diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 2a205d5f01..d1ef3afda2 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -205,6 +205,8 @@ private: DECLARE_NO_COPY_CLASS(StretchBltModeChanger) }; +#if wxUSE_DYNLIB_CLASS + // helper class to cache dynamically loaded libraries and not attempt reloading // them if it fails class wxOnceOnlyDLLLoader @@ -244,6 +246,8 @@ private: static wxOnceOnlyDLLLoader wxGDI32DLL(_T("gdi32")); static wxOnceOnlyDLLLoader wxMSIMG32DLL(_T("msimg32")); +#endif // wxUSE_DYNLIB_CLASS + // =========================================================================== // implementation // =========================================================================== @@ -1748,7 +1752,7 @@ void wxDC::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, SIZE sizeRect; const size_t len = string.length(); - if ( !::GetTextExtentPoint32(GetHdc(), string, len, &sizeRect) ) + if ( !::GetTextExtentPoint32(GetHdc(), string.wx_str(), len, &sizeRect) ) { wxLogLastError(_T("GetTextExtentPoint32()")); } @@ -2673,6 +2677,8 @@ void wxDC::DoGradientFillLinear (const wxRect& rect, wxDCBase::DoGradientFillLinear(rect, initialColour, destColour, nDirection); } +#if wxUSE_DYNLIB_CLASS + static DWORD wxGetDCLayout(HDC hdc) { typedef DWORD (WINAPI *GetLayout_t)(HDC); @@ -2715,3 +2721,17 @@ void wxDC::SetLayoutDirection(wxLayoutDirection dir) pfnSetLayout(GetHdc(), layout); } + +#else // !wxUSE_DYNLIB_CLASS + +// we can't provide RTL support without dynamic loading, so stub it out +wxLayoutDirection wxDC::GetLayoutDirection() const +{ + return wxLayout_Default; +} + +void wxDC::SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) +{ +} + +#endif // wxUSE_DYNLIB_CLASS/!wxUSE_DYNLIB_CLASS