aboutsummaryrefslogtreecommitdiff
path: root/CPP/7zip/UI/FileManager/StdAfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/FileManager/StdAfx.h')
-rw-r--r--CPP/7zip/UI/FileManager/StdAfx.h80
1 files changed, 71 insertions, 9 deletions
diff --git a/CPP/7zip/UI/FileManager/StdAfx.h b/CPP/7zip/UI/FileManager/StdAfx.h
index 0e6d446..789cc6e 100644
--- a/CPP/7zip/UI/FileManager/StdAfx.h
+++ b/CPP/7zip/UI/FileManager/StdAfx.h
@@ -1,21 +1,83 @@
1// stdafx.h 1// StdAfx.h
2 2
3#ifndef __STDAFX_H 3#ifndef ZIP7_INC_STDAFX_H
4#define __STDAFX_H 4#define ZIP7_INC_STDAFX_H
5 5
6/* we used 0x0400 for Windows NT supporting (MENUITEMINFOW) 6#if defined(_MSC_VER) && _MSC_VER >= 1800
7 But now menu problem is fixed. So it's OK to use 0x0500 (Windows 2000) */ 7#pragma warning(disable : 4464) // relative include path contains '..'
8#endif
9
10#include "../../../../C/Compiler.h"
8 11
12Z7_DIAGNOSCTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER
13#ifndef _WIN32_WINNT
9// #define _WIN32_WINNT 0x0400 14// #define _WIN32_WINNT 0x0400
10#define _WIN32_WINNT 0x0500 15#define _WIN32_WINNT 0x0500
16// #define _WIN32_WINNT 0x0600
17// #define _WIN32_WINNT 0x0A00
18#endif
19#ifndef WINVER
11#define WINVER _WIN32_WINNT 20#define WINVER _WIN32_WINNT
21#endif
22// #define _WIN32_IE 0x400 // for debug
23Z7_DIAGNOSCTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER
12 24
13#include "../../../Common/Common.h" 25#include "../../../Common/Common.h"
26#include "../../../Common/MyWindows.h"
27
28#endif
14 29
15// #include "../../../Common/MyWindows.h" 30/*
31WINVER and _WIN32_WINNT
16 32
17// #include <CommCtrl.h> 33MSVC6 / 2003sdk:
18// #include <ShlObj.h> 34{
19// #include <Shlwapi.h> 35 <windows.h> doesn't set _WIN32_WINNT
36 if WINVER is not set <windows.h> sets WINVER to value:
37 0x0400 : MSVC6
38 0x0501 : Windows Server 2003 PSDK / 2003 R2 PSDK
39}
20 40
41SDK for Win7 (and later)
42{
43 <windows.h> sets _WIN32_WINNT if it's not set.
44 <windows.h> sets WINVER if it's not set.
45<windows.h> includes <sdkddkver.h> that does:
46#if !defined(_WIN32_WINNT) && !defined(_CHICAGO_)
47 #define _WIN32_WINNT 0x0601 // in win7 sdk
48 #define _WIN32_WINNT 0x0A00 // in win10 sdk
21#endif 49#endif
50#ifndef WINVER
51 #ifdef _WIN32_WINNT
52 #define WINVER _WIN32_WINNT
53 else
54 #define WINVER 0x0601 // in win7 sdk
55 #define WINVER 0x0A00 // in win10 sdk
56 endif
57#endif
58}
59
60Some GUI structures defined by windows will be larger,
61If (_WIN32_WINNT) value is larger.
62
63Also if we send sizeof(win_gui_struct) to some windows function,
64and we compile that code with big (_WIN32_WINNT) value,
65the window function in old Windows can fail, if that old Windows
66doesn't understand new big version of (win_gui_struct) compiled
67with big (_WIN32_WINNT) value.
68
69So it's better to define smallest (_WIN32_WINNT) value here.
70In 7-Zip FM we use some functions that require (_WIN32_WINNT == 0x0500).
71So it's simpler to define (_WIN32_WINNT == 0x0500) here.
72If we define (_WIN32_WINNT == 0x0400) here, we need some manual
73declarations for functions and macros that require (0x0500) functions.
74Also libs must contain these (0x0500+) functions.
75
76Some code in 7-zip FM uses also CommCtrl.h structures
77that depend from (_WIN32_IE) value. But default
78(_WIN32_IE) value from <windows.h> probably is OK for us.
79So we don't set _WIN32_IE here.
80default _WIN32_IE value set by <windows.h>:
81 0x501 2003sdk
82 0xa00 win10 sdk
83*/