override default c++ class template in visual studio 2010 -


when create new c++ class in visual studio 2010, generates class template code. how can modify template suit own needs ?

one problem finding info of information creating templates .net , process different visual c++. answer not want hear because involves editing javascript code rather editing template file. it's possible can create brand new wizard uses template file, 1 way modify default template without doing that. modifying wizard code involves editing javascript file:

c:\program files\microsoft visual studio 10.0\vc\vcwizards\codewiz\generic\class\scripts\1033\default.js

the javascript uses codemodel manipulate (or generate, in case) source code. inside file there onfinish function can use modify class details output. see line in file:

var newclass = ocm.addclass(strclassname, strheader, vscmaddpositionend, "", "", vscmaccessdefault); 

to add new function like:

newclass.addfunction("myfunction", vscmfunctionfunction, vscmtyperefvoid, vscmaddpositionend, vscmaccesspublic, strimpl); 

you can read here:

inside visual c++ wizards

reference documentation:

designing wizard


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -