Using ClassView
ClassView shows all the C++ classes for which definitions are available, and the members of those classes. Double-click on a class icon (or click the + symbol beside the icon) to expand the class and display its members.
ClassView uses icons to represent classes, class members, and other items in the project. The following table shows the icons and their meanings:
Icon | Meaning |
Class | |
Protected member function | |
Private member function | |
Public member function | |
Protected member variable | |
Private member variable | |
Public member variable | |
Interface | |
Method (for a COM object) | |
Property (for a COM object) | |
Dialog |
Visual C++ derives the contents of the ClassView pane using a dynamic parser that scans the source files included in the project workspace. When you type in a new class, variable, or member function, ClassView and WizardBar are now automatically updated without saving.
The relationships in ClassView are logical relationships, not physical relationships, according to the defined class structure. ClassView displays C++ classes for which definitions according to the ANSI standard are available, and the members of those classes. For example, the following code provides both a declaration and a definition for class MyClass
, its constructor, and a function, MyFunc()
. The class and its two member functions will appear in ClassView.
class MyClass
{
public:
MyClass();
void MyFunc(void);
};
For a member to appear in the ClassView list, it must be declared in a header file included in the project.
See Adding a Class for the implications of defining classes and members without the use of the Visual C++ New Class feature.
In ClassView, you can:
Add a new class to the project.
Add member functions to the selected class.
Delete a member function from the selected class.
Add member variables to the selected class.
Add a virtual function that overrides a virtual function in the base class.
Add a message handler for the selected class.
Go to the definition of a class or member.
Go to the references to a class or member.
Reuse a class by storing it in the Gallery for later use in other projects.
Set a breakpoint on a member function.
Group class members by access specifier or alphabetically.
See Also Using WizardBar, Using ClassWizard