X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/920b9675d9e4ae7f721bd6eeb85c184a74434f7b..a24dc1a836159cbec24c577d9e576f8dbafad728:/src/msw/display.cpp diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 10012b320f..2758483bba 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "display.h" #endif @@ -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" @@ -166,10 +168,10 @@ static wxDisplayInfoArray *gs_displays = NULL; // ---------------------------------------------------------------------------- static BOOL CALLBACK wxmswMonitorEnumProc ( - HMONITOR hMonitor, // handle to display monitor - HDC hdcMonitor, // handle to monitor-appropriate device context (NULL) - LPRECT lprcMonitor, // pointer to monitor intersection rectangle - LPARAM dwData // data passed from EnumDisplayMonitors (unused) + HMONITOR hMonitor, // handle to display monitor + HDC WXUNUSED(hdcMonitor), // handle to monitor-appropriate device context + LPRECT lprcMonitor, // pointer to monitor intersection rectangle + LPARAM WXUNUSED(dwData) // data passed from EnumDisplayMonitors (unused) ) { wxDisplayInfo *info = new wxDisplayInfo(); @@ -193,9 +195,9 @@ static BOOL CALLBACK wxmswMonitorEnumProc ( BOOL PASCAL wxDDEnumExCallback(GUID *pGuid, - LPTSTR driverDescription, + LPTSTR WXUNUSED(driverDescription), LPTSTR driverName, - LPVOID lpContext, + LPVOID WXUNUSED(lpContext), HMONITOR hmon) { if ( pGuid ) @@ -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")); } @@ -539,7 +545,7 @@ wxString wxDisplay::GetNameForEnumSettings() const // ---------------------------------------------------------------------------- wxArrayVideoModes -wxDisplay::DoGetModesDirectX(const wxVideoMode& modeMatch) const +wxDisplay::DoGetModesDirectX(const wxVideoMode& WXUNUSED(modeMatch)) const { wxArrayVideoModes modes;