diff -Naur blender-4.5.2/intern/ghost/intern/GHOST_WindowWin32.cc blender-4.5.2-patched/intern/ghost/intern/GHOST_WindowWin32.cc
--- blender-4.5.2/intern/ghost/intern/GHOST_WindowWin32.cc	2025-08-26 12:31:30.244968400 +0300
+++ blender-4.5.2-patched/intern/ghost/intern/GHOST_WindowWin32.cc	2025-08-26 12:32:25.206528100 +0300
@@ -323,11 +323,11 @@
   GetMonitorInfo(hmonitor, &monitor);
 
   /* Constrain requested size and position to fit within this monitor. */
-  LONG width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left);
-  LONG height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top);
-  win_rect->left = min(max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width);
+  LONG width = std::min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left);
+  LONG height = std::min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top);
+  win_rect->left = std::min(std::max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width);
   win_rect->right = win_rect->left + width;
-  win_rect->top = min(max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height);
+  win_rect->top = std::min(std::max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height);
   win_rect->bottom = win_rect->top + height;
 
   /* With Windows 10 and newer we can adjust for chrome that differs with DPI and scale. */
@@ -349,7 +349,7 @@
   }
 
   /* But never allow a top position that can hide part of the title bar. */
-  win_rect->top = max(monitor.rcWork.top, win_rect->top);
+  win_rect->top = std::max(monitor.rcWork.top, win_rect->top);
 }
 
 bool GHOST_WindowWin32::getValid() const
diff -Naur blender-4.5.2/intern/ghost/intern/GHOST_Wintab.cc blender-4.5.2-patched/intern/ghost/intern/GHOST_Wintab.cc
--- blender-4.5.2/intern/ghost/intern/GHOST_Wintab.cc	2025-08-26 12:31:30.268001800 +0300
+++ blender-4.5.2-patched/intern/ghost/intern/GHOST_Wintab.cc	2025-08-26 12:32:25.210527500 +0300
@@ -93,10 +93,10 @@
   const int maxQueue = 500;
   /* < 0 should realistically never happen, but given we cast to size_t later on better safe than
    * sorry. */
-  int queueSize = max(0, queueSizeGet(hctx.get()));
+  int queueSize = std::max(0, queueSizeGet(hctx.get()));
 
   while (queueSize < maxQueue) {
-    int testSize = min(queueSize + 16, maxQueue);
+    int testSize = std::min(queueSize + 16, maxQueue);
     if (queueSizeSet(hctx.get(), testSize)) {
       queueSize = testSize;
     }
