Viewing Code Comments

Home Page (Text Editor)OverviewHow Do I ... TopicsFAQReference

By default, any comments in the source code that use the // or /* delimiters are displayed next to their associated member in the Members list. As you traverse the list, IntelliSense displays up to 12 lines of the comment in a pop-up window next to the highlighted member:

To turn off the automatic display of comments, clear the Code comments check box under Statement completion options on the Editor tab of the Options dialog box (Tools menu).

When more than one comment exists for a function, IntelliSense determines which comment to display in the Members list by where it appears in the code:

  1. IntelliSense will first display end-of-line comments in the declaration. For example:
    void MyFunction();    //EOL declaration comments
    
  2. If IntelliSense does not find the previous type of comment, it will display comments that appear directly above the declaration (with no blank space in-between). For example:
    //Before declaration comments
    void MyFunction();

  1. If the previous two types of comments are not found in the code, IntelliSense will then display end-of-line comments in the definition. For example:
    int CMyAppDoc::MyVariable=2; // EOL definition comments
    
  2. Finally, if none of the previous types of comments appear in the code, IntelliSense will display comments that appear directly above the definition (with no blank space in-between).  For example:
    //Before definition comments
    CMyAppDoc::MyFunction() 
    {
    return; 
    }