Creating an Attributed ATL Object

As you saw previously, attributes take away a lot of repetitive clutter, enabling you to concentrate on the real logic in your code. The next step for this project is to create an ATL object that can be used by your MFC client later. Using the Solution Explorer, right-click the ATLAttributes project and select Add, Add Class. Select ATL Simple Object from the list in the dialog that is displayed and click Open to close it. You should now be presented with the ATL Simple Object Wizard, as shown in Figure 15.3. Give your object the name AttributeTest by filling in the edit box labeled Short Name and accept all the defaults by clicking Finish to close the dialog.

Figure 15.3. The ATL Simple Object Wizard.

The next ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.