From f29cfd7775c13ca8f59361624b1d2a35397e125b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 16 Apr 2004 20:07:23 +0000 Subject: [PATCH] Mingw compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/display.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/msw/display.cpp b/src/msw/display.cpp index fc25e3f476..2758483bba 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -31,7 +31,9 @@ #if wxUSE_DISPLAY #ifndef WX_PRECOMP + #include "wx/app.h" #include "wx/dynarray.h" + #include "wx/frame.h" #endif #include "wx/dynload.h" @@ -218,7 +220,7 @@ HRESULT WINAPI wxDDEnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) { // we need at least the mode size - static const int FLAGS_REQUIRED = DDSD_HEIGHT | DDSD_WIDTH; + static const DWORD FLAGS_REQUIRED = DDSD_HEIGHT | DDSD_WIDTH; if ( (lpDDSurfaceDesc->dwFlags & FLAGS_REQUIRED) == FLAGS_REQUIRED ) { wxArrayVideoModes * const modes = (wxArrayVideoModes *)lpContext; @@ -505,7 +507,11 @@ wxString wxDisplay::GetName() const wxZeroMemory(monInfo); monInfo.cbSize = sizeof(monInfo); - if ( !::GetMonitorInfo(dpyInfo.m_hmon, &monInfo) ) + // NB: Cast from MONITORINFOEX* to MONITORINFO* is done because + // Mingw headers - unlike the ones from Microsoft's Platform SDK - + // don't derive the former from the latter in C++ mode and so + // the pointer's type is not converted implicitly. + if ( !::GetMonitorInfo(dpyInfo.m_hmon, (LPMONITORINFO)&monInfo) ) { wxLogLastError(_T("GetMonitorInfo")); }