aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/7zip/Bundles/SFXWin/SfxWin.cpp30
1 files changed, 22 insertions, 8 deletions
diff --git a/CPP/7zip/Bundles/SFXWin/SfxWin.cpp b/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
index 3e1880e..de2ffa4 100644
--- a/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
+++ b/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
@@ -41,11 +41,18 @@ using namespace NDir;
41extern 41extern
42HINSTANCE g_hInstance; 42HINSTANCE g_hInstance;
43HINSTANCE g_hInstance; 43HINSTANCE g_hInstance;
44extern
45bool g_DisableUserQuestions;
46bool g_DisableUserQuestions;
44 47
45#ifndef UNDER_CE 48#ifndef UNDER_CE
46 49
47static 50#if !defined(Z7_WIN32_WINNT_MIN) || Z7_WIN32_WINNT_MIN < 0x0500 // win2000
48DWORD g_ComCtl32Version; 51#define Z7_USE_DYN_ComCtl32Version
52#endif
53
54#ifdef Z7_USE_DYN_ComCtl32Version
55Z7_DIAGNOSTIC_IGNORE_CAST_FUNCTION
49 56
50static DWORD GetDllVersion(LPCTSTR dllName) 57static DWORD GetDllVersion(LPCTSTR dllName)
51{ 58{
@@ -71,6 +78,7 @@ static DWORD GetDllVersion(LPCTSTR dllName)
71} 78}
72 79
73#endif 80#endif
81#endif
74 82
75extern 83extern
76bool g_LVN_ITEMACTIVATE_Support; 84bool g_LVN_ITEMACTIVATE_Support;
@@ -86,14 +94,18 @@ static void ErrorMessageForHRESULT(HRESULT res)
86static int APIENTRY WinMain2() 94static int APIENTRY WinMain2()
87{ 95{
88 // OleInitialize is required for ProgressBar in TaskBar. 96 // OleInitialize is required for ProgressBar in TaskBar.
89 #ifndef UNDER_CE 97#ifndef UNDER_CE
90 OleInitialize(NULL); 98 OleInitialize(NULL);
91 #endif 99#endif
92 100
93 #ifndef UNDER_CE 101#ifndef UNDER_CE
94 g_ComCtl32Version = ::GetDllVersion(TEXT("comctl32.dll")); 102#ifdef Z7_USE_DYN_ComCtl32Version
95 g_LVN_ITEMACTIVATE_Support = (g_ComCtl32Version >= MAKELONG(71, 4)); 103 {
96 #endif 104 const DWORD g_ComCtl32Version = ::GetDllVersion(TEXT("comctl32.dll"));
105 g_LVN_ITEMACTIVATE_Support = (g_ComCtl32Version >= MAKELONG(71, 4));
106 }
107#endif
108#endif
97 109
98 UString password; 110 UString password;
99 bool assumeYes = false; 111 bool assumeYes = false;
@@ -135,6 +147,8 @@ static int APIENTRY WinMain2()
135 } 147 }
136 } 148 }
137 149
150 g_DisableUserQuestions = assumeYes;
151
138 FString path; 152 FString path;
139 NDLL::MyGetModuleFileName(path); 153 NDLL::MyGetModuleFileName(path);
140 154