Browse Source

Enable themed Windows dialogs when building with Visual Studio

Sam Lantinga 3 months ago
parent
commit
a8c41135aa
1 changed files with 5 additions and 1 deletions
  1. 5 1
      test/testmessage.c

+ 5 - 1
test/testmessage.c

@@ -11,13 +11,17 @@
 */
 
 /* Simple test of the SDL MessageBox API */
-
 #include <stdlib.h>
 
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_main.h>
 #include <SDL3/SDL_test.h>
 
+/* This enables themed Windows dialogs when building with Visual Studio */
+#if defined(SDL_PLATFORM_WINDOWS) && defined(_MSC_VER)
+#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0'  processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+
 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
 static void
 quit(int rc)