diff --git a/modules/juce_audio_basics/juce_audio_basics.cpp b/modules/juce_audio_basics/juce_audio_basics.cpp
index c5a6bfa..fae5bff 100644
--- a/modules/juce_audio_basics/juce_audio_basics.cpp
+++ b/modules/juce_audio_basics/juce_audio_basics.cpp
@@ -31,7 +31,7 @@
 
 #include "juce_audio_basics.h"
 
-#if JUCE_MINGW && ! defined (__SSE2__)
+#if JUCE_MINGW
  #define JUCE_USE_SSE_INTRINSICS 0
 #endif
 
diff --git a/modules/juce_audio_processors/format_types/juce_VST3Headers.h b/modules/juce_audio_processors/format_types/juce_VST3Headers.h
index de33170..ef37a65 100644
--- a/modules/juce_audio_processors/format_types/juce_VST3Headers.h
+++ b/modules/juce_audio_processors/format_types/juce_VST3Headers.h
@@ -90,12 +90,13 @@
   #define _set_abort_behavior(...)
  #endif
  #include <base/source/baseiids.cpp>
+ #include <base/source/fatomic.cpp>
  #include <base/source/fbuffer.cpp>
  #include <base/source/fdebug.cpp>
  #include <base/source/fobject.cpp>
  #include <base/source/fstreamer.cpp>
  #include <base/source/fstring.cpp>
- #include <base/source/flock.cpp>
+ #include <base/source/fthread.cpp>
  #include <base/source/updatehandler.cpp>
  #include <pluginterfaces/base/conststringtable.cpp>
  #include <pluginterfaces/base/funknown.cpp>
diff --git a/modules/juce_events/native/juce_win32_Messaging.cpp b/modules/juce_events/native/juce_win32_Messaging.cpp
index f55e540..12858ba 100644
--- a/modules/juce_events/native/juce_win32_Messaging.cpp
+++ b/modules/juce_events/native/juce_win32_Messaging.cpp
@@ -104,7 +104,7 @@ namespace WindowsMessageHelpers
     }
 }
 
-#if JUCE_MODULE_AVAILABLE_juce_gui_extra
+#if JUCE_MODULE_AVAILABLE_juce_gui_extra && ! JUCE_MINGW
 LRESULT juce_offerEventToActiveXControl (::MSG&);
 #endif
 
@@ -119,7 +119,7 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
 
     if (GetMessage (&m, (HWND) 0, 0, 0) >= 0)
     {
-      #if JUCE_MODULE_AVAILABLE_juce_gui_extra
+      #if JUCE_MODULE_AVAILABLE_juce_gui_extra && ! JUCE_MINGW
         if (juce_offerEventToActiveXControl (m) != S_FALSE)
             return true;
       #endif
diff --git a/modules/juce_gui_basics/juce_gui_basics.cpp b/modules/juce_gui_basics/juce_gui_basics.cpp
index b710d39..a98f00e 100644
--- a/modules/juce_gui_basics/juce_gui_basics.cpp
+++ b/modules/juce_gui_basics/juce_gui_basics.cpp
@@ -83,6 +83,7 @@
 
  #if JUCE_MINGW
   #include <imm.h>
+  #define JUCE_DISABLE_WIN32_DPI_AWARENESS 1
  #endif
 
 //==============================================================================
diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
index 569c400..a390474 100644
--- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
+++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp
@@ -206,6 +206,10 @@ extern void* getUser32Function (const char*);
   };
 #endif
 
+#if JUCE_MINGW
+static bool canUseMultiTouch()   { return false; }
+static void checkForPointerAPI() { }
+#else
 typedef BOOL (WINAPI* RegisterTouchWindowFunc) (HWND, ULONG);
 typedef BOOL (WINAPI* GetTouchInputInfoFunc) (HTOUCHINPUT, UINT, TOUCHINPUT*, int);
 typedef BOOL (WINAPI* CloseTouchInputHandleFunc) (HTOUCHINPUT);
@@ -259,6 +263,7 @@ static void checkForPointerAPI()
                      && getPointerTouchInfo    != nullptr
                      && getPointerPenInfo      != nullptr);
 }
+#endif
 
 static Rectangle<int> rectangleFromRECT (const RECT& r) noexcept
 {
@@ -1578,7 +1583,9 @@ private:
                 case WM_MOUSEACTIVATE:
                 case WM_NCMOUSEHOVER:
                 case WM_MOUSEHOVER:
+#if ! JUCE_MINGW
                 case WM_TOUCH:
+#endif
                 case WM_POINTERUPDATE:
                 case WM_NCPOINTERUPDATE:
                 case WM_POINTERWHEEL:
@@ -1694,8 +1701,10 @@ private:
 
             RegisterDragDrop (hwnd, dropTarget);
 
+#if ! JUCE_MINGW
             if (canUseMultiTouch())
                 registerTouchWindow (hwnd, 0);
+#endif
 
             setDPIAwareness();
             setMessageFilter();
@@ -2025,8 +2034,10 @@ private:
 
     bool isTouchEvent() noexcept
     {
+#if ! JUCE_MINGW
         if (registerTouchWindow == nullptr)
             return false;
+#endif
 
         // Relevant info about touch/pen detection flags:
         // https://msdn.microsoft.com/en-us/library/windows/desktop/ms703320(v=vs.85).aspx
@@ -2194,6 +2205,7 @@ private:
 
     static MouseInputSource::InputSourceType getPointerType (WPARAM wParam)
     {
+#if ! JUCE_MINGW
         if (getPointerTypeFunction != nullptr)
         {
             POINTER_INPUT_TYPE pointerType;
@@ -2207,6 +2219,7 @@ private:
                     return MouseInputSource::InputSourceType::pen;
             }
         }
+#endif
 
         return MouseInputSource::InputSourceType::mouse;
     }
@@ -2228,6 +2241,7 @@ private:
             peer->handleMouseWheel (getPointerType (wParam), localPos, getMouseEventTime(), wheel);
     }
 
+#if ! JUCE_MINGW
     bool doGestureEvent (LPARAM lParam)
     {
         GESTUREINFO gi;
@@ -2403,6 +2417,7 @@ private:
 
         return touchInput;
     }
+#endif
 
     bool handlePenInput (POINTER_PEN_INFO penInfo, Point<float> pos, const float pressure, bool isDown, bool isUp)
     {
@@ -2945,6 +2960,7 @@ private:
 
                 return 1;
 
+#if ! JUCE_MINGW
             //==============================================================================
             case WM_POINTERUPDATE:
                 if (handlePointerInput (wParam, lParam, false, false))
@@ -2960,6 +2976,7 @@ private:
                 if (handlePointerInput (wParam, lParam, false, true))
                     return 0;
                 break;
+#endif
 
             //==============================================================================
             case WM_MOUSEMOVE:          doMouseMove (getPointFromLParam (lParam), false); return 0;
@@ -2990,6 +3007,7 @@ private:
 
                 return 0;
 
+#if ! JUCE_MINGW
             case WM_TOUCH:
                 if (getTouchInputInfo != nullptr)
                     return doTouchEvent ((int) wParam, (HTOUCHINPUT) lParam);
@@ -3001,6 +3019,7 @@ private:
                     return 0;
 
                 break;
+#endif
 
             //==============================================================================
             case WM_SIZING:                return handleSizeConstraining (*(RECT*) lParam, wParam);
@@ -3898,6 +3917,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userIn
     const bool isMain = (info.dwFlags & 1 /* MONITORINFOF_PRIMARY */) != 0;
     double dpi = 0;
 
+   #if ! JUCE_DISABLE_WIN32_DPI_AWARENESS
     if (getDPIForMonitor != nullptr)
     {
         UINT dpiX = 0, dpiY = 0;
@@ -3905,6 +3925,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userIn
         if (SUCCEEDED (getDPIForMonitor (hm, MDT_Default, &dpiX, &dpiY)))
             dpi = (dpiX + dpiY) / 2.0;
     }
+   #endif
 
     ((Array<MonitorInfo>*) userInfo)->add (MonitorInfo (rectangleFromRECT (*r), isMain, dpi));
 
