Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Adding a Class 

To add a class in your Visual C++ project, display the Add Class dialog box by right-clicking the project in either Solution Explorer or Class View. From the shortcut menu, click Add, and then click Add Class.

When you add a class, you must specify a name that is different from classes already existing in MFC or ATL. If you specify a name that already exists in either library, Visual C++ displays an error message indicating that the specified name is reserved.

If your project naming convention requires you to use an existing name, then you can change the letter case, because Visual C++ is case sensitive. That is, you can name a class cdocument, but you cannot name a class CDocument.

What kind of class do you want to add?

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.