X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/657a8a359826e46a7fc458216403f54deca34989..c2a738e372126950e5c70f72a3e8876f1ac89bf5:/include/wx/msw/private.h?ds=sidebyside diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index a840110a97..9e40732a37 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -289,7 +289,9 @@ inline void wxCopyRectToRECT(const wxRect& rect, RECT& rc) // translations between HIMETRIC units (which OLE likes) and pixels (which are // liked by all the others) - implemented in msw/utilsexc.cpp extern void HIMETRICToPixel(LONG *x, LONG *y); +extern void HIMETRICToPixel(LONG *x, LONG *y, HDC hdcRef); extern void PixelToHIMETRIC(LONG *x, LONG *y); +extern void PixelToHIMETRIC(LONG *x, LONG *y, HDC hdcRef); // Windows convention of the mask is opposed to the wxWidgets one, so we need // to invert the mask each time we pass one/get one to/from Windows @@ -366,7 +368,9 @@ inline RECT wxGetWindowRect(HWND hwnd) RECT rect; if ( !::GetWindowRect(hwnd, &rect) ) - wxLogLastError(_T("GetWindowRect")); + { + wxLogLastError(wxT("GetWindowRect")); + } return rect; } @@ -376,7 +380,9 @@ inline RECT wxGetClientRect(HWND hwnd) RECT rect; if ( !::GetClientRect(hwnd, &rect) ) - wxLogLastError(_T("GetClientRect")); + { + wxLogLastError(wxT("GetClientRect")); + } return rect; } @@ -446,7 +452,7 @@ public: void Init(HDC hdc, HGDIOBJ hgdiobj) { - wxASSERT_MSG( !m_hdc, _T("initializing twice?") ); + wxASSERT_MSG( !m_hdc, wxT("initializing twice?") ); m_hdc = hdc; @@ -475,7 +481,7 @@ protected: void InitGdiobj(HGDIOBJ gdiobj) { - wxASSERT_MSG( !m_gdiobj, _T("initializing twice?") ); + wxASSERT_MSG( !m_gdiobj, wxT("initializing twice?") ); m_gdiobj = gdiobj; } @@ -568,7 +574,9 @@ public: : m_hdc(hdc) { if ( !::SelectClipRgn(hdc, hrgn) ) - wxLogLastError(_T("SelectClipRgn")); + { + wxLogLastError(wxT("SelectClipRgn")); + } } ~HDCClipper() @@ -597,7 +605,9 @@ private: { m_modeOld = ::SetMapMode(hdc, mm); if ( !m_modeOld ) - wxLogLastError(_T("SelectClipRgn")); + { + wxLogLastError(wxT("SelectClipRgn")); + } } ~HDCMapModeChanger() @@ -632,7 +642,9 @@ public: { m_hGlobal = ::GlobalAlloc(flags, size); if ( !m_hGlobal ) - wxLogLastError(_T("GlobalAlloc")); + { + wxLogLastError(wxT("GlobalAlloc")); + } } GlobalPtr(size_t size, unsigned flags = GMEM_MOVEABLE) @@ -643,7 +655,9 @@ public: ~GlobalPtr() { if ( m_hGlobal && ::GlobalFree(m_hGlobal) ) - wxLogLastError(_T("GlobalFree")); + { + wxLogLastError(wxT("GlobalFree")); + } } // implicit conversion @@ -679,7 +693,9 @@ public: // global scope operator with it (and neither with GlobalUnlock()) m_ptr = GlobalLock(hGlobal); if ( !m_ptr ) - wxLogLastError(_T("GlobalLock")); + { + wxLogLastError(wxT("GlobalLock")); + } } // initialize the object, HGLOBAL must not be NULL @@ -696,7 +712,7 @@ public: DWORD dwLastError = ::GetLastError(); if ( dwLastError != NO_ERROR ) { - wxLogApiError(_T("GlobalUnlock"), dwLastError); + wxLogApiError(wxT("GlobalUnlock"), dwLastError); } } } @@ -729,12 +745,12 @@ public: { // we should only be called if we hadn't been initialized yet wxASSERT_MSG( m_registered == -1, - _T("calling ClassRegistrar::Register() twice?") ); + wxT("calling ClassRegistrar::Register() twice?") ); m_registered = ::RegisterClass(&wc) ? 1 : 0; if ( !IsRegistered() ) { - wxLogLastError(_T("RegisterClassEx()")); + wxLogLastError(wxT("RegisterClassEx()")); } else { @@ -755,7 +771,7 @@ public: { if ( !::UnregisterClass(m_clsname.wx_str(), wxhInstance) ) { - wxLogLastError(_T("UnregisterClass")); + wxLogLastError(wxT("UnregisterClass")); } } } @@ -797,7 +813,7 @@ private: #define GetHbrushOf(brush) ((HBRUSH)(brush).GetResourceHandle()) #define GetHmenu() ((HMENU)GetHMenu()) -#define GetHmenuOf(menu) ((HMENU)menu->GetHMenu()) +#define GetHmenuOf(menu) ((HMENU)(menu)->GetHMenu()) #define GetHcursor() ((HCURSOR)GetHCURSOR()) #define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR()) @@ -806,7 +822,7 @@ private: #define GetHfontOf(font) ((HFONT)(font).GetHFONT()) #define GetHimagelist() ((HIMAGELIST)GetHIMAGELIST()) -#define GetHimagelistOf(imgl) ((HIMAGELIST)imgl->GetHIMAGELIST()) +#define GetHimagelistOf(imgl) ((HIMAGELIST)(imgl)->GetHIMAGELIST()) #define GetHpalette() ((HPALETTE)GetHPALETTE()) #define GetHpaletteOf(pal) ((HPALETTE)(pal).GetHPALETTE()) @@ -841,7 +857,7 @@ inline wxString wxGetFullModuleName(HMODULE hmod) MAX_PATH ) ) { - wxLogLastError(_T("GetModuleFileName")); + wxLogLastError(wxT("GetModuleFileName")); } return fullname;