[REGEDIT] Use InitCommonControlsEx instead of InitCommonControls (#3686)

NOTE: Windows sets 0xFFFF to icce.dwICC but we use better value.
This commit is contained in:
Katayama Hirofumi MZ 2021-05-26 21:11:10 +09:00 committed by GitHub
parent b0ebf68d98
commit 949e3a9cec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);