diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2026-03-09 20:53:39 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2026-03-09 20:54:00 +0800 |
| commit | 25761b5ef0d9d385ac2a371b62913f98350d6f56 (patch) | |
| tree | 390af43ab603dafa6b6dbca5da282aa96875533a /gui/win32/src/main.c | |
| parent | ca94a2d3378663a8184a37d62e18a198cb141338 (diff) | |
Initialize common controls and add manifest for Windows XP
Diffstat (limited to 'gui/win32/src/main.c')
| -rw-r--r-- | gui/win32/src/main.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 |
