In this section, reference topics for the ATL macros are organized alphabetically. To find a particular macro by category, see ATL Macros.
| Macro | Description | 
|---|---|
| A symbol which enables errors in projects converted from previous versions of ATL. | |
| Define if one or more of your objects use apartment threading. | |
| Makes certain CString constructors explicit, preventing any unintentional conversions. | |
| Define this macro before including any ATL header files to trace all AddRef and Release calls on your components' interfaces to the output window. | |
| Writes all calls to QueryInterface to the output window. | |
| Define if one or more of your objects use free or neutral threading. | |
| Tells the compiler that your ATL application is comprised of native and /clr compilands. | |
| A symbol that indicates the project will have objects that are marked as Both, Free or Neutral. The macro _ATL_FREE_THREADED should be used in new code. | |
| A symbol which prevents COM-related code from being compiled with your project. | |
| A symbol which prevents the default use of namespace as ATL. | |
| Suppresses compiler warnings for the use of deprecated ATL functions. | |
| A symbol that indicates you want the registration code for your object to be in the object to avoid a dependency on ATL.DLL. | |
| Statement(s) to handle errors occurring in the associated _ATLTRY | |
| Statement(s) to handle errors occurring in the associated _ATLTRY. | |
| Marks a guarded code section where an error could possibly occur. | |
| These flags are used to control the behavior of EscapeXML. | |
| Marks the beginning of an alternate message map. | |
| String conversion macros valid for both ATL and MFC. | |
| The ATLASSERT macro performs the same functionality as the _ASSERTE macro found in the C run-time library. | |
| A symbol that indicates a function should not be inlined. | |
| A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor. | |
| These flags modify the behavior of AtlEscapeUrl and AtlCanonicalizeUrl. | |
| The members of this enumeration provide constants for the schemes understood by CUrl. | |
| This macro defines the default value in milliseconds that CWorkerThread::Shutdown will wait for the worker thread to shut down. | |
| This macro defines the default time in milliseconds that CThreadPool will wait for a thread to shut down. | |
| This macro defines the default number of threads per processor used by CThreadPool. | |
| These flags describe how quoted-printable encoding is to be performed by QPEncode. | |
| These flags describe how uuencoding is to be performed by UUEncode. | |
| Reports warnings to an output device, such as the debugger window, according to the indicated flags and levels. Included for backward compatibility. | |
| Reports warnings to an output device, such as the debugger window, according to the indicated flags and levels. | |
| In debug builds of ATL, sends the string "funcname is not implemented" to the dump device and returns E_NOTIMPL. | |
| Marks the beginning of the category map. | |
| The COM map is the mechanism that exposes interfaces on an object to a client through QueryInterface. | |
| Marks the beginning of the connection point map entries. | |
| Marks the beginning of the snap-in extension data class map. | |
| Marks the beginning of the default message map. | |
| Marks the beginning of the object's property map. | |
| Marks the beginning of the Registry Data Exchange map. | |
| Marks the beginning of the service map. | |
| Declares the beginning of the event sink map for the composite control. | |
| Declares the beginning of the toolbar ID map for the Snap-In object. | |
| Defines an entry in a message map. | |
| Defines an entry in a message map. | |
| Defines an entry in a message map. | |
| Defines an entry in a message map. | |
| Defines an entry in a message map. | |
| These macros enter an object's interfaces into its COM map so that they can be accessed by QueryInterface. | |
| Enters interfaces into the COM interface map. | |
| Use this macro to disambiguate two branches of inheritance. | |
| Same as COM_INTERFACE_ENTRY2, except you can specify a different IID. | |
| When the interface identified by iid is queried for, COM_INTERFACE_ENTRY_AGGREGATE forwards to punk. | |
| Same as COM_INTERFACE_ENTRY_AGGREGATE, except that querying for any IID results in forwarding the query to punk. | |
| Same as COM_INTERFACE_ENTRY_AGGREGATE, except if punk is NULL, it automatically creates the aggregate described by the clsid. | |
| Same as COM_INTERFACE_ENTRY_AUTOAGGREGATE, except that querying for any IID results in forwarding the query to punk, and if punk is NULL, automatically creating the aggregate described by the clsid. | |
| Causes your program to call DebugBreak when the specified interface is queried for. | |
| Saves the interface-specific data for every instance. | |
| Processes the COM map of the base class when the processing reaches this entry in the COM map. | |
| A general mechanism for hooking into ATL's QueryInterface logic. | |
| Same as COM_INTERFACE_ENTRY_FUNC, except that querying for any IID results in a call to func. | |
| Use this macro to enter the interface into the COM map and specify its IID. | |
| Returns E_NOINTERFACE and terminates COM map processing when the specified interface is queried for. | |
| Exposes your tear-off interfaces. | |
| Similar to COMMAND_HANDLER, but maps a WM_COMMAND message based only on the notification code. | |
| Defines an entry in a message map. | |
| Similar to COMMAND_HANDLER, but maps a WM_COMMAND message based only on the identifier of the menu item, control, or accelerator. | |
| Similar to COMMAND_RANGE_HANDLER, but maps WM_COMMAND messages with a specific notification code from a range of controls to a single handler function. | |
| Similar to COMMAND_HANDLER, but maps WM_COMMAND messages from a range of controls to a single handler function. | |
| Enters a connection point for the specified interface into the connection point map so that it can be accessed. | |
| Specifies that your object can be aggregated. | |
| Declares CComClassFactory to be the class factory. | |
| Declares CComClassFactory2 to be the class factory. | |
| Declares CComClassFactoryAutoThread to be the class factory. | |
| Declares cf to be the class factory. | |
| Declares CComClassFactorySingleton to be the class factory. | |
| Declares an empty message map. | |
| Declares a virtual function GetControllingUnknown. | |
| Provides a way for ATL to obtain the libid of the type library. | |
| Use DECLARE_NO_REGISTRY if you want to avoid any default ATL registration for the class in which this macro appears. | |
| Specifies that your object cannot be aggregated. | |
| Allows you to specify a text description for your class object. | |
| Used in ATL ActiveX controls to set the OLEMISC flags. | |
| Specifies that your object must be aggregated. | |
| Specifies that an instance of CComPolyObject < x > is created when your object is created. | |
| Protects your object from being deleted if (during FinalConstruct) the internal aggregated object increments the reference count then decrements the count to 0. | |
| Enters the standard class registration into the system registry or removes it from the system registry. | |
| Specifies the information required to automatically register the appid. | |
| Gets the named resource containing the registry file and runs the script to either enter objects into the system registry or remove them from the system registry. | |
| Same as DECLARE_REGISTRY_RESOURCE except that it uses a wizard-generated UINT to identify the resource, rather than a string name. | |
| Place this macro in an ATL ActiveX control's control class to specify the VIEWSTATUS flags to the container. | |
| Allows you to specify the name of a new window class. Place this macro in an ATL ActiveX control's control class. | |
| Allows you to specify the name of an existing window class on which a new window class will be based. Place this macro in an ATL ActiveX control's control class. | |
| Allows you to specify the parameters of a class. Place this macro in an ATL ActiveX control's control class. | |
| Provides a default handler for the child window (control) that will receive reflected messages; the handler will properly pass unhandled messages to DefWindowProc. | |
| These macros create a copy of a DEVMODE or TEXTMETRIC structure and convert the strings within the new structure to a new string type. | |
| Marks the end of the category map. | |
| Ends the definition of your COM interface map. | |
| Marks the end of the connection point map entries. | |
| Marks the end of the snap-in extension data class map. | |
| Marks the end of a message map. | |
| Marks the end of the object's property map. | |
| Marks the end of the Registry Data Exchange map. | |
| Marks the end of the service map. | |
| Declares the end of the event sink map for the composite control. | |
| Declares the end of the toolbar ID map for the Snap-In object. | |
| Adds a data member to the snap-in extension data class for an ISnapInItemImpl-derived class. | |
| Adds a snap-in extension data class to the snap-in extension data class map. | |
| Forwards notification messages to the parent window. | |
| Add an IMPLEMENTED_CATEGORY macro to your component's category map to specify that it should be registered as implementing the category identified by the catID parameter. | |
| Defines an entry in a message map. | |
| Similar to MESSAGE_HANDLER, but maps a range of Windows messages to a single handler function. | |
| Similar to NOTIFY_HANDLER, but maps a WM_NOTIFY message based only on the notification code. | |
| Defines an entry in a message map. | |
| Similar to NOTIFY_HANDLER, but maps a WM_NOTIFY message based only on the control identifier. | |
| Similar to NOTIFY_RANGE_HANDLER, but maps WM_NOTIFY messages with a specific notification code from a range of controls to a single handler function. | |
| Similar to NOTIFY_HANDLER, but maps WM_NOTIFY messages from a range of controls to a single handler function. | |
| Enters an ATL object into the object map, updates the registry, and creates an instance of the object. | |
| Allows you to specify that the object should be registered and initialized, but it should not be externally creatable via CoCreateInstance. | |
| Indicates the extent, or dimensions, of an ActiveX control. | |
| Use this macro to enter a property description, property DISPID, and property page CLSID into the object's property map. | |
| Similar to PROP_ENTRY_TYPE, but allows you specify a particular IID if your object supports multiple dual interfaces. | |
| Use this macro to enter a property page CLSID into the object's property map. | |
| Associates the specified registry entry with a specified member variable of type BYTE. | |
| Associates the specified registry entry with a specified member variable of type CString. | |
| Associates the specified registry entry with a specified member variable of type DWORD. | |
| Associates the specified registry entry with a specified member variable of type TCHAR. | |
| Reflects notification messages back to the child window (control) that sent them. | |
| Similar to COMMAND_CODE_HANDLER, but maps commands reflected from the parent window. | |
| Similar to COMMAND_HANDLER, but maps commands reflected from the parent window. | |
| Similar to COMMAND_ID_HANDLER, but maps commands reflected from the parent window. | |
| Similar to COMMAND_RANGE_CODE_HANDLER, but maps commands reflected from the parent window. | |
| Similar to COMMAND_RANGE_HANDLER, but maps commands reflected from the parent window. | |
| Similar to NOTIFY_CODE_HANDLER, but maps notifications reflected from the parent window. | |
| Similar to NOTIFY_HANDLER, but maps notifications reflected from the parent window. | |
| Similar to NOTIFY_ID_HANDLER, but maps notifications reflected from the parent window. | |
| Similar to NOTIFY_RANGE_CODE_HANDLER, but maps notifications reflected from the parent window. | |
| Similar to NOTIFY_RANGE_HANDLER, but maps notifications reflected from the parent window. | |
| Add a REQUIRED_CATEGORY macro to your component's category map to specify that it should be registered as requiring the category identified by the catID parameter. | |
| Indicates that the object supports the service id specified by SID. | |
| Instructs IServiceProviderImpl::QueryService to chain to the object specified by punk. | |
| Declares the handler function (fn) for the specified event (dispid), of the control identified by id. | |
| Declares the handler function (fn) for the specified event (dispid), of the dispatch interface (iid), for the control identified by id. | |
| Use the SINK_ENTRY_INFO macro within an event sink map to provide the information needed by IDispEventSimpleImpl to route events to the relevant handler function. | |
| Use this macro to declare the context menu resource of the Snap-In object. | |
| Use this macro to enter a toolbar ID into the Snap-In object's toolbar ID map. | |
| This macro forwards a message received by a window to another window for processing. |