From: Vadim Zeitlin Date: Sun, 24 Jan 2010 14:15:12 +0000 (+0000) Subject: Compilation fix after ownerdraw-refactor branch merge. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b8190883d0ecb3dc5ccdb1b0142c2fe079a7e79a Compilation fix after ownerdraw-refactor branch merge. Don't use HDC in public headers, it may not be declared there. Use WXHDC instead even if this means having ugly casts. This fixed mingw32 compilation (see #11595). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/msw/menuitem.h b/include/wx/msw/menuitem.h index 38ad3ed2c6..909a3ae5c9 100644 --- a/include/wx/msw/menuitem.h +++ b/include/wx/msw/menuitem.h @@ -120,7 +120,7 @@ protected: private: // helper function for draw std menu check mark - void DrawStdCheckMark(HDC hdc, const RECT* rc, wxODStatus stat); + void DrawStdCheckMark(WXHDC hdc, const RECT* rc, wxODStatus stat); #endif // wxUSE_OWNER_DRAWN diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index fb0369196d..8ebf138ace 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -1035,7 +1035,7 @@ bool wxMenuItem::OnDrawItem(wxDC& dc, const wxRect& rc, { if ( stat & wxODChecked ) { - DrawStdCheckMark(hdc, &rcImg, stat); + DrawStdCheckMark((WXHDC)hdc, &rcImg, stat); } } else @@ -1133,8 +1133,10 @@ void DrawColorCheckMark(HDC hdc, int x, int y, int cx, int cy, HDC hdcCheckMask, } // anonymous namespace -void wxMenuItem::DrawStdCheckMark(HDC hdc, const RECT* rc, wxODStatus stat) +void wxMenuItem::DrawStdCheckMark(WXHDC hdc_, const RECT* rc, wxODStatus stat) { + HDC hdc = (HDC)hdc_; + #if wxUSE_UXTHEME wxUxThemeEngine* theme = MenuDrawData::GetUxThemeEngine(); if ( theme )