diff --git a/src/main.cpp b/src/main.cpp index 4ce06ee..f05f80c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -345,7 +345,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara { HWND h = CreateWindowExW(0, L"BUTTON", txt, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, - 20, y, 260, 35, hwnd, (HMENU)(INT_PTR)id, + 20, y, 350, 35, hwnd, (HMENU)(INT_PTR)id, GetModuleHandleW(nullptr), nullptr); if (DarkMode::IsActive()) { @@ -433,6 +433,9 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara // ─── WinMain ───────────────────────────────────────────────────────────────── int WINAPI wWinMain(_In_ HINSTANCE hInst, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR pCmdLine, _In_ int nShow) { + SetProcessDpiAwarenessContext( + DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); + INITCOMMONCONTROLSEX icc = { sizeof(icc), ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES }; InitCommonControlsEx(&icc); @@ -448,7 +451,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInst, _In_opt_ HINSTANCE hPrevInstance, _In_ g_hwnd = CreateWindowExW(0, L"DarkTDDemo", L"Dark TaskDialog Demo", WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, 320, 290, + CW_USEDEFAULT, CW_USEDEFAULT, 400, 290, nullptr, nullptr, hInst, nullptr); if (DarkMode::IsActive()) {