mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[MAGNIFY] Initialize the common controls as the program has a manifest
This commit is contained in:
parent
7a133609e7
commit
6a124ef38a
2 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue