Changing the default Visual Studio class setting

I want to change the default code created by the add-> visual studio ... class for C and C ++.

Currently it looks like

#pragma once class GlWindow { public: GlWindow(void); ~GlWindow(void); }; 

While I would like to use the correct guards included, the constructor / destructor constructor and have curly braces next to the class name.

It annoyed me since I adapted my own coding style. I still use my own script for it, but if it adds my class files to the project and the visual studio is open, it will be a huge time saver.

Thanks a lot of friends. Hope this is possible.

+4
source share
1 answer

You can find the code for generating the C ++ general class in INSTALLED_FOLDER \ VC \ VCWizards \ CodeWiz \ Generic \ Class \ Scripts \ 1033 \ default.js.Where INSTALLED_FOLDER represents "C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ "You can write your own template or wizard to create code that meets your own standards. We hope this link leads you to the details for creating a custom VS template.

+1
source

All Articles