alroyso 1 年之前
父節點
當前提交
29ba4afe1f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      windows/runner/main.cpp

+ 4 - 0
windows/runner/main.cpp

@@ -28,6 +28,10 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
   if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
     CreateAndAttachConsole();
   }
+  else {
+    AllocConsole();
+    ShowWindow(GetConsoleWindow(), SW_HIDE);
+  }
   // Initialize COM, so that it is available for use in the library and/or
   // plugins.
   ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);