summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWeicao-CatilGrass <1992414357@qq.com>2026-03-09 20:53:39 +0800
committerWeicao-CatilGrass <1992414357@qq.com>2026-03-09 20:54:00 +0800
commit25761b5ef0d9d385ac2a371b62913f98350d6f56 (patch)
tree390af43ab603dafa6b6dbca5da282aa96875533a /gui
parentca94a2d3378663a8184a37d62e18a198cb141338 (diff)
Initialize common controls and add manifest for Windows XP
Diffstat (limited to 'gui')
-rw-r--r--gui/win32/.gitignore1
-rw-r--r--gui/win32/app.manifest30
-rw-r--r--gui/win32/src/main.c24
3 files changed, 54 insertions, 1 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ </application>
+ </compatibility>
+
+ <application xmlns="urn:schemas-microsoft-com:asm.v3">
+ <windowsSettings>
+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
+ </windowsSettings>
+ </application>
+
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="*"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+</assembly>
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 <wchar.h>
#include <windows.h>
+#include <commctrl.h>
// 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