From 25761b5ef0d9d385ac2a371b62913f98350d6f56 Mon Sep 17 00:00:00 2001
From: Weicao-CatilGrass <1992414357@qq.com>
Date: Mon, 9 Mar 2026 20:53:39 +0800
Subject: Initialize common controls and add manifest for Windows XP
---
gui/win32/.gitignore | 1 -
gui/win32/app.manifest | 30 ++++++++++++++++++++++++++++++
gui/win32/src/main.c | 24 ++++++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 gui/win32/app.manifest
(limited to 'gui')
diff --git a/gui/win32/.gitignore b/gui/win32/.gitignore
index 3ce4fb3..eb3cee1 100644
--- a/gui/win32/.gitignore
+++ b/gui/win32/.gitignore
@@ -26,7 +26,6 @@ CTestTestfile.cmake
*.pch
*.res
*.sbr
-*.manifest
*.exp
*.lib
*.dll
diff --git a/gui/win32/app.manifest b/gui/win32/app.manifest
new file mode 100644
index 0000000..973c721
--- /dev/null
+++ b/gui/win32/app.manifest
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ PerMonitorV2
+
+
+
+
+
+
+
+
+
diff --git a/gui/win32/src/main.c b/gui/win32/src/main.c
index b7f7603..8b23ebc 100644
--- a/gui/win32/src/main.c
+++ b/gui/win32/src/main.c
@@ -1,16 +1,40 @@
#include "resource.h"
+#include
#include
+#include
// Global variables
static HINSTANCE hInst;
const wchar_t CLASS_NAME[] = L"ButchunkerWindow";
+// Control IDs
+#define IDC_CHECKBOX1 1009
+#define IDC_CHECKBOX2 1008
+#define IDC_CHECKBOX3 1007
+#define IDC_BUTTON_CHECK 1006
+
// Function declarations
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PWSTR pCmdLine, int nCmdShow)
{
+ INITCOMMONCONTROLSEX icex;
+ icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
+ icex.dwICC = ICC_STANDARD_CLASSES | ICC_WIN95_CLASSES;
+ InitCommonControlsEx(&icex);
+
+ #ifdef _WIN32_WINNT_WINXP
+ #pragma comment(linker, \
+ "/manifestdependency:\"type='win32' \
+ name='Microsoft.Windows.Common-Controls' \
+ version='6.0.0.0' \
+ processorArchitecture='*' \
+ publicKeyToken='6595b64144ccf1df' \
+ language='*'\"" \
+ )
+ #endif
+
(void)hPrevInstance; // Unused parameter
(void)pCmdLine; // Unused parameter
--
cgit