[CPL][APPWIZ] Add InitCommonControls calls (#2316)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 9 Feb 2020 05:42:26 +0000 (14:42 +0900)
committerGitHub <noreply@github.com>
Sun, 9 Feb 2020 05:42:26 +0000 (14:42 +0900)
CORE-16669

dll/cpl/appwiz/createlink.c

index 46cf6f9..e514036 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "appwiz.h"
+#include <commctrl.h>
 #include <shellapi.h>
 #include <strsafe.h>
 
@@ -495,7 +496,7 @@ PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
 }
 
 LONG CALLBACK
-ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
+ShowCreateShortcutWizard(HWND hwndCPl, LPCWSTR szPath)
 {
     PROPSHEETHEADERW psh;
     HPROPSHEETPAGE ahpsp[2];
@@ -601,7 +602,8 @@ LONG
 CALLBACK
 NewLinkHereW(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 {
-    return ShowCreateShortcutWizard(hwndCPl, (LPWSTR) lParam1);
+    InitCommonControls();
+    return ShowCreateShortcutWizard(hwndCPl, (LPWSTR)lParam1);
 }
 
 LONG
@@ -612,6 +614,7 @@ NewLinkHereA(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
     if (MultiByteToWideChar(CP_ACP, 0, (LPSTR)lParam1, -1, szFile, _countof(szFile)))
     {
+        InitCommonControls();
         return ShowCreateShortcutWizard(hwndCPl, szFile);
     }
     return -1;