다음을 통해 공유


// Implementation Comment

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at -- Implementation Comment.

The // Implementation section is the most important part of any MFC class declaration.

This section houses all implementation details. Both member variables and member functions can appear in this section. Everything below this line could change in a future release of MFC. Unless you cannot avoid it, you should not rely on details below the // Implementation line. In addition, members declared below the implementation line are not documented, although some implementation is discussed in technical notes. Overrides of virtual functions in the base class reside in this section, regardless of which section the base class function is defined in, because the fact that a function overrides the base class implementation is considered an implementation detail. Typically, these members are protected, but not always.

Notice from the CStdioFile listing under An Example of the Comments that members declared below the // Implementation comment may be declared as public, protected, or private. You should only use these members with caution, because they may change in the future. Declaring a group of members as public may be necessary for the class library implementation to work correctly. However, this does not mean that you may safely use the members so declared.

Note

You may find comments of the remaining types either above or below the // Implementation comment. In either case, they describe the kinds of members declared below them. If they occur below the // Implementation comment, you should assume that the members may change in future versions of MFC.

See Also

Using the MFC Source Files
An Example of the Comments
// Constructors Comment
// Attributes Comment
// Operations Comment
// Overridables Comment