You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[_ATL_ALL_WARNINGS](#_atl_all_warnings)|A symbol that enables errors in projects converted from previous versions of ATL.|
16
-
|[_ATL_APARTMENT_THREADED](#_atl_apartment_threaded)|Define if one or more of your objects use apartment threading.|
17
-
|[_ATL_CSTRING_EXPLICIT_CONSTRUCTORS](#_atl_cstring_explicit_constructors)|Makes certain `CString` constructors explicit, preventing any unintentional conversions.|
18
-
|[_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning)|Define this macro to require C++ standard syntax. It generates the C4867 compiler error when non-standard syntax is used to initialize a pointer to a member function.|
19
-
|[_ATL_FREE_THREADED](#_atl_free_threaded)|Define if one or more of your objects use free or neutral threading.|
20
-
|[_ATL_MODULES](#_ATL_MODULES)|Allows you to compile ATL projects with [permissive-](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).|
21
-
|[_ATL_MULTI_THREADED](#_atl_multi_threaded)|A symbol that indicates the project will have objects that are marked as Both, Free or Neutral. The macro [_ATL_FREE_THREADED](#_atl_free_threaded) should be used instead.|
22
-
|[_ATL_NO_AUTOMATIC_NAMESPACE](#_atl_no_automatic_namespace)|A symbol that prevents the default use of namespace as ATL.|
23
-
|[_ATL_NO_COM_SUPPORT](#_atl_no_com_support)|A symbol that prevents COM-related code from being compiled with your project.|
24
-
|[ATL_NO_VTABLE](#atl_no_vtable)|A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.|
25
-
|[ATL_NOINLINE](#atl_noinline)|A symbol that indicates a function shouldn't be inlined.|
26
-
|[_ATL_SINGLE_THREADED](#_atl_single_threaded)|Define if all of your objects use the single threading model.|
|[`_ATL_ALL_WARNINGS`](#_atl_all_warnings)|A symbol that enables errors in projects converted from previous versions of ATL.|
15
+
|[`_ATL_APARTMENT_THREADED`](#_atl_apartment_threaded)|Define if one or more of your objects use apartment threading.|
16
+
|[`_ATL_CSTRING_EXPLICIT_CONSTRUCTORS`](#_atl_cstring_explicit_constructors)|Makes certain `CString` constructors explicit, preventing any unintentional conversions.|
17
+
|[`_ATL_ENABLE_PTM_WARNING`](#_atl_enable_ptm_warning)|Define this macro to require C++ standard syntax. It generates the C4867 compiler error when non-standard syntax is used to initialize a pointer to a member function.|
18
+
|[`_ATL_FREE_THREADED`](#_atl_free_threaded)|Define if one or more of your objects use free or neutral threading.|
19
+
|[`_ATL_MODULES`](#_ATL_MODULES)|Allows you to compile ATL projects with [permissive-](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).|
20
+
|[`_ATL_MULTI_THREADED`](#_atl_multi_threaded)|A symbol that indicates the project has objects marked as Both, Free or Neutral. The macro [`_ATL_FREE_THREADED`](#_atl_free_threaded) should be used instead.|
21
+
|[`_ATL_NO_AUTOMATIC_NAMESPACE`](#_atl_no_automatic_namespace)|A symbol that prevents the default use of namespace as ATL.|
22
+
|[`_ATL_NO_COM_SUPPORT`](#_atl_no_com_support)|A symbol that prevents COM-related code from being compiled with your project.|
23
+
|[`ATL_NO_VTABLE`](#atl_no_vtable)|A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.|
24
+
|[`ATL_NOINLINE`](#atl_noinline)|A symbol that indicates a function shouldn't be inlined.|
25
+
|[`_ATL_SINGLE_THREADED`](#_atl_single_threaded)|Define if all of your objects use the single threading model.|
A symbol that enables errors in projects converted from previous versions of ATL.
31
30
32
-
```
31
+
```cpp
33
32
#define_ATL_ALL_WARNINGS
34
33
```
35
34
@@ -53,15 +52,15 @@ Before Visual C++ .NET 2002, ATL disabled many warnings and left them disabled s
53
52
54
53
In projects converted from previous versions, these warnings are still disabled by the libraries headers.
55
54
56
-
By adding the following line to the *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier) file before including libraries headers, this behavior can be changed.
55
+
To change this behavior, add the following line to the *`pch.h`* (*`stdafx.h`* in Visual Studio 2017 and earlier) file before including libraries headers.
If this `#define` is added, the ATL headers are careful to preserve the state of these warnings so that they're not disabled globally (or if the user explicitly disables individual warnings, not to enable them).
61
60
62
61
New projects have this `#define` set in *pch.h* (*stdafx.h* in Visual Studio 2017 and earlier) by default.
Define if one or more of your objects use apartment threading.
67
66
@@ -73,23 +72,23 @@ _ATL_APARTMENT_THREADED
73
72
74
73
Specifies apartment threading. For other options, and a description of the threading models available for an ATL object, see [Specifying the Project's Threading Model](../../atl/specifying-the-threading-model-for-a-project-atl.md) and [Options, ATL Simple Object Wizard](../../atl/reference/options-atl-simple-object-wizard.md).
Makes certain `CString` constructors explicit, preventing any unintentional conversions.
79
78
80
-
```cpp
79
+
```
81
80
_ATL_CSTRING_EXPLICIT_CONSTRUCTORS
82
81
```
83
82
84
83
### Remarks
85
84
86
-
When this constructor is defined, all CString constructors that take a single parameter are compiled with the explicit keyword, which prevents implicit conversions of input arguments. This means, for example, that when _UNICODE is defined, if you attempt to use a char* string as a CString constructor argument, a compiler error will result. Use this macro in situations where you need to prevent implicit conversions between narrow and wide string types.
85
+
When this constructor is defined, all `CString` constructors that take a single parameter are compiled with the explicit keyword, which prevents implicit conversions of input arguments. This means, for example, that when `_UNICODE` is defined, if you attempt to use a `char*` string as a `CString` constructor argument, a compiler error results. Use this macro in situations where you need to prevent implicit conversions between narrow and wide string types.
87
86
88
-
By using the _T macro on all constructor string arguments, you can define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS and avoid compile errors regardless of whether _UNICODE is defined.
87
+
By using the `_T` macro on all constructor string arguments, you can define `_ATL_CSTRING_EXPLICIT_CONSTRUCTORS` and avoid compile errors regardless of whether `_UNICODE` is defined.
Define this macro in order to force the use of ANSI C++ standard-conforming syntax for pointer to member functions. Using this macro will cause the C4867 compiler error to be generated when non-standard syntax is used to initialize a pointer to a member function.
91
+
Define this macro in order to force the use of ANSI C++ standard-conforming syntax for pointer to member functions. Using this macro causes the C4867 compiler error to be generated when non-standard syntax is used to initialize a pointer to a member function.
93
92
94
93
```cpp
95
94
#define_ATL_ENABLE_PTM_WARNING
@@ -99,7 +98,7 @@ Define this macro in order to force the use of ANSI C++ standard-conforming synt
99
98
100
99
The ATL and MFC libraries have been changed to match the Microsoft C++ compiler's improved standard C++ conformance. According to the ANSI C++ standard, the syntax of a pointer to a class member function should be `&CMyClass::MyFunc`.
101
100
102
-
When [_ATL_ENABLE_PTM_WARNING](#_atl_enable_ptm_warning)is not defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define **_ATL_ENABLE_PTM_WARNING**, your code should conform to the C++ standard.
101
+
When [`_ATL_ENABLE_PTM_WARNING`](#_atl_enable_ptm_warning)isn't defined (the default case), ATL/MFC disables the C4867 error in macro maps (notably message maps) so that code that was created in earlier versions can continue to build as before. If you define `_ATL_ENABLE_PTM_WARNING`, your code should conform to the C++ standard.
103
102
104
103
However, the non-standard form has been deprecated. You need to move existing code to C++ standard syntax. For example, the following code:
105
104
@@ -111,7 +110,7 @@ Should be changed to:
111
110
112
111
For map macros, add the ampersand '&' character. You shouldn't add the character again in your code.
Define if one or more of your objects use free or neutral threading.
117
116
@@ -125,13 +124,13 @@ Specifies free threading. Free threading is equivalent to a multithread apartmen
125
124
126
125
## <aname="_ATL_MODULES"></a> `_ATLMODULES`
127
126
128
-
Allows you to compile ATL projects with [permissive-](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).
127
+
Allows you to compile ATL projects with [`permissive-`](../../build/reference/permissive-standards-conformance.md) and use ATL with [C++ modules](../../cpp/modules-cpp.md).
A symbol that indicates the project will have objects that are marked as Both, Free or Neutral.
137
136
@@ -141,9 +140,9 @@ _ATL_MULTI_THREADED
141
140
142
141
### Remarks
143
142
144
-
If this symbol is defined, ATL will pull in code that will correctly synchronize access to global data. New code should use the equivalent macro [_ATL_FREE_THREADED](#_atl_free_threaded) instead.
143
+
If this symbol is defined, ATL pulls in code that will correctly synchronize access to global data. New code should use the equivalent macro [`_ATL_FREE_THREADED`](#_atl_free_threaded) instead.
A symbol that prevents the default use of namespace as ATL.
149
148
@@ -153,17 +152,17 @@ _ATL_NO_AUTOMATIC_NAMESPACE
153
152
154
153
### Remarks
155
154
156
-
If this symbol is not defined, including atlbase.h will perform **using namespace ATL** by default, which may lead to naming conflicts. To prevent this, define this symbol.
155
+
If this symbol isn't defined, including `atlbase.h` performs `using namespace ATL` by default, which may lead to naming conflicts. To prevent this, define this symbol.
A symbol that prevents COM-related code from being compiled with your project.
161
160
162
161
```
163
162
_ATL_NO_COM_SUPPORT
164
163
```
165
164
166
-
## <aname="atl_no_vtable"></a> ATL_NO_VTABLE
165
+
## <aname="atl_no_vtable"></a> `ATL_NO_VTABLE`
167
166
168
167
A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.
169
168
@@ -173,13 +172,13 @@ ATL_NO_VTABLE
173
172
174
173
### Remarks
175
174
176
-
If the vtable pointer is prevented from being initialized in the class's constructor and destructor, the linker can eliminate the vtable and all of the functions to which it points. Expands to **`__declspec(novtable)`**.
175
+
If the vtable pointer is prevented from being initialized in the class's constructor and destructor, the linker can eliminate the vtable and all of the functions to which it points. Expands to `__declspec(novtable)`.
A symbol that indicates a function shouldn't be inlined.
185
184
@@ -193,14 +192,14 @@ A symbol that indicates a function shouldn't be inlined.
193
192
194
193
### Parameters
195
194
196
-
*myfunction*<br/>
195
+
*`myfunction`*\
197
196
The function that should not be inlined.
198
197
199
198
### Remarks
200
199
201
-
Use this symbol if you want to ensure a function does not get inlined by the compiler, even though it must be declared as inline so that it can be placed in a header file. Expands to **`__declspec(noinline)`**.
200
+
Use this symbol if you want to ensure a function does not get inlined by the compiler, even though it must be declared as inline so that it can be placed in a header file. Expands to `__declspec(noinline)`.
0 commit comments