https://git.reactos.org/?p=reactos.git;a=commitdiff;h=949e3a9cece68c25f4086f8e2387e541f9e6c589

commit 949e3a9cece68c25f4086f8e2387e541f9e6c589
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Wed May 26 21:11:10 2021 +0900
Commit:     GitHub <[email protected]>
CommitDate: Wed May 26 21:11:10 2021 +0900

    [REGEDIT] Use InitCommonControlsEx instead of InitCommonControls (#3686)
    
    NOTE: Windows sets 0xFFFF to icce.dwICC but we use better value.
---
 base/applications/regedit/main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c
index e85e62f51b4..05f0e475f62 100644
--- a/base/applications/regedit/main.c
+++ b/base/applications/regedit/main.c
@@ -57,7 +57,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 {
     BOOL AclUiAvailable;
     HMENU hEditMenu;
-
+    INITCOMMONCONTROLSEX icce;
     WNDCLASSEXW wcFrame;
     WNDCLASSEXW wcChild;
     ATOM hFrameWndClass;
@@ -97,8 +97,10 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
     hPopupMenus = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDR_POPUP_MENUS));
 
     /* Initialize the Windows Common Controls DLL */
-    // TODO: Replace this call by InitCommonControlsEx(_something_)
-    InitCommonControls();
+    /* NOTE: Windows sets 0xFFFF to icce.dwICC but we use better value. */
+    icce.dwSize = sizeof(icce);
+    icce.dwICC = ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES | ICC_USEREX_CLASSES;
+    InitCommonControlsEx(&icce);
 
     hEditMenu = GetSubMenu(hMenuFrame, 1);
 

Reply via email to