ATL Samples
The following table is an alphabetical list of the ATL samples in Visual C++.
Note
When building a sample application, first verify that the platform is set to your current platform in the Solution's Configuration property page. For example, you may need to change the platform from Itanium to Win32.
In This Section
Advanced Samples
ACTIVEDOC Sample: Implements an Active Document Server
Demonstrates how to implement an Active Document Server.ASYNC Sample: Downloads Data Asynchronously
Downloads data asynchronously from a URL.ATLDuck Sample: Uses Connection Points with ATL
Demonstrates using connection points with ATL controls.ATLSecurity Sample: Demonstrates ATL Security Classes
Shows how to use the ATL security classes to examine security settings.ATLTraceTool Sample: Displays Output of ATLTRACE2
Displays the output generated by the ATLTRACE2 macro.CThreadPool Sample: Demonstrates How to Use a Thread Pool
Shows how to use a thread pool in an application and how implementing a thread pool can improve the application's performance.DCOM Sample: Demonstrates Remotely Calling a COM Object
Demonstrates how to call a COM object implemented in a Windows service from multiple clients running on different machines.Marquee Sample: Provides Performance Monitoring Data Through Scripting
Shows how to use performance monitor objects through scripting.MFCATL Sample: Uses ATL COM Objects in an MFC Server
Illustrates how ATL COM objects can be used in an MFC server EXE.
Attributes Samples
ASYNC Attributes Sample: Downloads Data Asynchronously
Downloads data asynchronously from a URL with attributes.ATLAgent Attributes Sample: Uses CCommand and CAccessor to Read Information from a Database
Demonstrates using CCommand and CAccessor to read information from a database, and demonstrates using the compiler COM support to control the Microsoft Agent control.ATLBUTTON Attributes Sample: Demonstrates a Button with Bitmaps for Different States
Creates a button that displays itself with three different bitmaps depending on its state.ATLCON Attributes Sample: Demonstrates Creating a Simple Container
Demonstrates a simple control container with attributes.ATLDuck Attributes Sample: Uses Connection Points with ATL
Demonstrates using connection points with ATL controls and attributes.ATLFire Attributes Sample: Demonstrates Building a Windowed Control
Demonstrates how to build a windowed control using ATL and attributes.ATLMovie Attributes Sample: Uses Compiler COM Support and Active Movie Interfaces in an ATL Control
Demonstrates using compiler COM support and the Active Movie interfaces to play a movie in an ATL control.ATLTangram Attributes Sample: Demonstrates Managing Large Projects That Use ATL, MFC, and COM
Demonstrates managing a large ATL project with multiple project dependencies in the IDE and with attributes. Also demonstrates some basic COM concepts.AutoThread Attributes Sample: Demonstrates the Use of CAtlAutoThreadModule
Demonstrates using CComAutoThreadModule Class with attributes.BEEPER Attributes Sample: Demonstrates a Tearoff Interface
Implements a tearoff interface — a collection/enumeration of BSTRs with attributes.CDINFO Attributes Sample: Plays and Displays Information About CD Audio Tracks
Plays CD audio tracks and displays information about the tracks in tooltips and a piechart display.CIRC Attributes Sample: Demonstrates Using Property Pages
Creates a control with attributes that demonstrates property pages and draws a circle.CIRCCOLL Attributes Sample: Demonstrates a Collection/Enumeration
Implements a collection/enumeration of objects using ATL with attributes and the Standard C++ Library.COMMAP Attributes Sample: Demonstrates COM Interface Map Entry Macros
Shows how different COM interface map entry macros are used.CONNECT Attributes Sample: Demonstrates Implementation and Use of Connection Points
Illustrates the implementation and use of connection points (the IConnectionPointContainer and IConnectionPoint interfaces) in a multithreaded environment.DIRECT3D Attributes Sample: Demonstrates Using Direct3D
Creates a control that draws a spinning triangle using the Direct3D graphics library and attributes.DispSink Attributes Sample: Handles Events Fired from a Singleton COM Server Through a Dispatch Interface
Demonstrates using a connection point on dispatch interfaces with attributes.LABRADOR Attributes Sample: Implements a Server with No User Interface
Implements an EXE server that does not have any user interface.MultiRead Attributes Sample: Reads Database Table Using Multiple Threads
Reads through a table in a database using multiple threads.OPENGL Attributes Sample: Demonstrates Using OpenGL
Creates a control that draws a spinning cube using the OpenGL graphics library and attributes.POLYGON Attributes Sample: Demonstrates Custom Properties, Events, a Property Page, and Object Safety
The project files for the ATL Tutorial. Builds a control that implements custom properties, events, property pages, and object safety with ATL and attributes.SUBEDIT Attributes Sample: Superclasses a Standard Windows Control
Creates a superclassed Windows control with attributes.
Controls Samples
ATLFire Sample: Demonstrates Building a Windowed Control
Demonstrates how to build a windowed control using ATL.CIRC Sample: Demonstrates Using Property Pages
Creates a control that demonstrates property pages and draws a circle.POLYGON Sample: The ATL Tutorial
The project files for the ATL Tutorial. Builds a control that implements custom properties, events, property pages, and object safety.SUBEDIT Sample: Superclasses a Standard Windows Control
Creates a superclassed Windows control.
General Samples
ATLCollections Sample: Demonstrates ICollectionOnSTLImpl, CComEnumOnSTL, and Custom Copy Policy Classes
Demonstrates the use of ICollectionOnSTLImpl and CComEnumOnSTL, and the implementation of custom copy policy classes.ATLCON Sample: Demonstrates Creating a Simple Container
Demonstrates a simple control container.ATLEventHandling Sample: Handles Word Events Using IDispEventImpl and IDispEventSimpleImpl
Demonstrates the use of IDispEventImpl and IDispEventSimpleImpl to handle events fired by Microsoft Word.ATLPages Sample: Implements a Property Page Using IPropertyPageImpl
Demonstrates the implementation of a property page using IPropertyPageImpl.ATLSafeArray Sample: Demonstrates CComSafeArray and Passing SAFEARRAYs to Script
Shows how to create and maintain SAFEARRAYs using CComSafeArray; also how to pass SAFEARRAYs from a component to script.AutoThread Sample: Demonstrates the Use of CAtlAutoThreadModule
Demonstrates using CComAutoThreadModule Class.BEEPER Sample: Demonstrates a Tearoff Interface
Implements a tearoff interface — a collection/enumeration of BSTRs.CIRCCOLL Sample: Demonstrates a Collection/Enumeration
Implements a collection/enumeration of objects using ATL and the Standard C++ Library.CustomString Sample: Demonstrates Custom Memory Allocators for CStringT
Shows how to use a custom memory allocator for CStringT to improve performance in a multithreaded application.DispSink Sample: Handles Events Fired from a Singleton COM Server Through a Dispatch Interface
Demonstrates using a connection point on dispatch interfaces.LABRADOR Sample: Implements a Server with No User Interface
Implements an EXE server that does not have any user interface.
OLE DB Templates Samples
AdvancedPV Sample: Demonstrates Advanced Provider Techniques
Similar to UpdatePV Sample: Implements an Updatable OLE DB Provider, but it demonstrates some advanced techniques.CatDB Sample: Data Source Schema Browser
Displays the schema information, such as tables and columns, of OLE DB providers.DBViewer Sample: Database Browser
Demonstrates a mid-level application that relies on the CManualAccessor class to take full control of data bindings for your applications.DynamicConsumer Sample: Uses Dynamic Accessor and Schema Rowset Classes to Read Metadata from a Database
Demonstrates using dynamic accessor and schema rowset classes to read metadata from a database.MultiRead Sample: Reads Database Table Using Multiple Threads
Reads through a table in a database using multiple threads.UpdatePV Sample: Implements an Updatable OLE DB Provider
Implements an updateable (read/write) OLE DB provider.