https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6a124ef38aa9ee9ff142f6...
commit 6a124ef38aa9ee9ff142f62cb897febe72df8f83 Author: Bișoc George fraizeraust99@gmail.com AuthorDate: Sun May 12 16:18:28 2019 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Tue May 14 20:49:36 2019 +0200
[MAGNIFY] Initialize the common controls as the program has a manifest --- base/applications/magnify/CMakeLists.txt | 2 +- base/applications/magnify/magnifier.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/base/applications/magnify/CMakeLists.txt b/base/applications/magnify/CMakeLists.txt index ee7919e948c..271b4aad229 100644 --- a/base/applications/magnify/CMakeLists.txt +++ b/base/applications/magnify/CMakeLists.txt @@ -7,6 +7,6 @@ list(APPEND SOURCE add_rc_deps(magnify.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/magnify.ico) add_executable(magnify ${SOURCE} magnify.rc) set_module_type(magnify win32gui) -add_importlibs(magnify user32 gdi32 advapi32 shell32 msvcrt kernel32) +add_importlibs(magnify user32 gdi32 comctl32 advapi32 shell32 msvcrt kernel32) add_pch(magnify magnifier.h SOURCE) add_cd_file(TARGET magnify DESTINATION reactos/system32 FOR all) diff --git a/base/applications/magnify/magnifier.c b/base/applications/magnify/magnifier.c index f8d63cfce45..cfca2519914 100644 --- a/base/applications/magnify/magnifier.c +++ b/base/applications/magnify/magnifier.c @@ -16,6 +16,7 @@ #include <winuser.h> #include <wingdi.h> #include <winnls.h> +#include <commctrl.h> #include <shellapi.h> #include <windowsx.h> #include <stdlib.h> @@ -77,6 +78,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine { MSG msg; HACCEL hAccelTable; + INITCOMMONCONTROLSEX iccex;
UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); @@ -111,6 +113,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } }
+ /* Load the common controls */ + iccex.dwSize = sizeof(INITCOMMONCONTROLSEX); + iccex.dwICC = ICC_STANDARD_CLASSES | ICC_WIN95_CLASSES; + InitCommonControlsEx(&iccex);
SelectObject(hdcOffscreen, hbmpOld); DeleteObject (hbmpOffscreen);