Scrier

Hi,

First of all I don't think this is the right place for this question as its not a c++ question but a question about visual studio 2003 editor when I work in a c++ project.

The thought struck me when working in a rather large project that the autocomplete of own classes when yo mark the only refers to file: and namespace: (in my case at least). Is there some keyword or way to add information in classes you make so that they can get some more information then the default generated one when working in the editor

best regards

Andreas



Re: Visual C++ General Adding comments for the .net editor

Ramkrishna Pawar

It's not very clear what you are looking for, do you mean if there is any way to set comments on your created functions, classes so that the user of function/class can see them as immediate help while using them with intellisensense






Re: Visual C++ General Adding comments for the .net editor

Scrier

Yes,

Mouseover is another example where you get information that I would like to add additional information more than the fileinfo and namespace.

// Andreas





Re: Visual C++ General Adding comments for the .net editor

Bite Qiu - MSFT

Scrier wrote:

Yes,

Mouseover is another example where you get information that I would like to add additional information more than the fileinfo and namespace.

// Andreas

Hi Andreas,

I believe the feature you are looking for is XML Doc Comments support. Visual C++ 2003 does not support such feature, But Visual C++ 2005 partially(with a limitation) support it. If it is possible for you to upgrade to Visual Studio 2005, then this is completely right place for your question and following information will be also helpful:

1. The limitation: In C++ we do not support XML Doc Comments directly from source code within the same project, and it only works for managed code.

2. To add additional information to intellisense in quick info tooltip and parameter info tooltip:

  • a. Enable XML Doc Comment via: Project | Properties | Configuration properties | C/C++ | Output Files | Generate XML Documentation Files -> Yes(/doc)
  • b. Add XML Doc Comment to your code: http://msdn2.microsoft.com/en-us/library/ms177227(VS.80).aspx
  • c. Build the project, now you have 2 files generated in output directory: assembly projectname.dll and xml file projectname.xml.
  • d. Use this assembly in another c++ project via the "#using <projectname.dll>" directive or the "/FU projectname.dll" compiler option.
  • e. Make sure the directory on disk where the "projectname.dll" you import resides also contains the "projectname.xml" file which containing the XML Doc Comments.
  • f. Now when you mouseover some member functions import from projectname.dll, a quick info tooltip will show up with informations that you provided in step b.

hope it helps

rico