diff --git a/include/wx/msw/private/graphicsd2d.h b/include/wx/msw/private/graphicsd2d.h index 993f61a960..390799d067 100644 --- a/include/wx/msw/private/graphicsd2d.h +++ b/include/wx/msw/private/graphicsd2d.h @@ -15,6 +15,9 @@ // Ensure no previous defines interfere with the Direct2D API headers #undef GetHwnd +// include before wincodec.h to prevent winsock/winsock2 redefinition warnings +#include "wx/msw/wrapwin.h" + #include #include #include diff --git a/src/msw/crashrpt.cpp b/src/msw/crashrpt.cpp index 64bb5cd70d..42a2437d9d 100644 --- a/src/msw/crashrpt.cpp +++ b/src/msw/crashrpt.cpp @@ -26,6 +26,7 @@ #if wxUSE_CRASHREPORT #ifndef WX_PRECOMP + #include "wx/wxcrtvararg.h" #endif //WX_PRECOMP #include "wx/msw/debughlp.h" diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 87e1a4bd01..da36e77523 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -14,9 +14,6 @@ // Minimum supported client: Windows 8 and Platform Update for Windows 7 #define wxD2D_DEVICE_CONTEXT_SUPPORTED 0 -// Ensure no previous defines interfere with the Direct2D API headers -#undef GetHwnd - // We load these functions at runtime from the d2d1.dll. // However, since they are also used inside the d2d1.h header we must provide // implementations matching the exact declarations. These defines ensures we @@ -36,9 +33,7 @@ #pragma warning(disable:4458) // declaration of 'xxx' hides class member #endif -#include -#include -#include +#include "wx/msw/private/graphicsd2d.h" #ifdef __MINGW64_TOOLCHAIN__ #ifndef DWRITE_E_NOFONT @@ -78,7 +73,6 @@ #include "wx/private/graphics.h" #include "wx/stack.h" #include "wx/sharedptr.h" -#include "wx/msw/private/graphicsd2d.h" // This must be the last header included to only affect the DEFINE_GUID() // occurrences below but not any GUIDs declared in the standard files included diff --git a/src/msw/rt/notifmsgrt.cpp b/src/msw/rt/notifmsgrt.cpp index af5cf3c578..1f7e7fd1a3 100644 --- a/src/msw/rt/notifmsgrt.cpp +++ b/src/msw/rt/notifmsgrt.cpp @@ -16,6 +16,8 @@ #if wxUSE_NOTIFICATION_MESSAGE && wxUSE_WINRT #ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/module.h" #include "wx/string.h" #endif // WX_PRECOMP diff --git a/src/msw/rt/utilsrt.cpp b/src/msw/rt/utilsrt.cpp index ecc12be979..c21c7fe55a 100644 --- a/src/msw/rt/utilsrt.cpp +++ b/src/msw/rt/utilsrt.cpp @@ -26,6 +26,10 @@ #if wxUSE_WINRT +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif //WX_PRECOMP + #include #include "wx/dynlib.h"