Jump to content
  • Advertisement
Sign in to follow this  
_jinx_

"stdafx.h" change default

This topic is 4821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just wondering how I can change my default "stdafx.h" from: #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <stdio.h> #include <tchar.h> to #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <stdio.h> #include <tchar.h> #include <iostream> or #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <stdio.h> #include <tchar.h> #include <iostream> #include <conio.h> #include <math.h> Thanks, simple answer I know!

Share this post


Link to post
Share on other sites
Advertisement
I don't believe you can change the defaults created by the wizard, but you can create your own custom wizard that will set up a project exactly how you want it. For info on how to do this, look here.

Share this post


Link to post
Share on other sites
Quote:
Original post by rpg_code_master
You could just make your own version of it. Then when you create a project that requires it, just include it into the project. [smile]


Right, but by default it includes "stdafx.h" now say I no longer need that header file and i need mine "mynewheader.h" instead by default allthe time, how would I go about doing that. Having "stdafx.h" would create overhead I wouldn't need. Basically I am trying to do less code by not typing my #includes everytime I start a new project. I am not trying to be lazy I'm just trying to optimize what I have and what I can do..that's all.

BTW - I am looking into the Custom Wizard creation now.

Thanks!

Share this post


Link to post
Share on other sites
Ahh the custom wizard isn't working yet, not implemented in 2005 beta, but thats ok I have 2003.net at home and will give this a shot again. Thanks again!

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave Hunt
I don't believe you can change the defaults created by the wizard, but you can create your own custom wizard that will set up a project exactly how you want it. For info on how to do this, look here.


Oh, it would be dangerous but at least it seems you can (vs.net): check out {vs.net2003}\Vc7\VCWizards\mfcappwiz\Templates\1033 (where {vs.net2003} is your install directory): it contains a stdafx.h file which can be customized.

Again: I wouldn't do it if I were you (or at least, do a backup before modifying your files).

Regards,

Share this post


Link to post
Share on other sites
I'll look into that, I have a test machine with it installed so, I can run what ever I want haha. Thanks! What do you guys normally do, just type in all your header files? Obvioulsy when your working with big applications yea, but what about when you study and use the same header files for each project, what do you guys normally do?

Share this post


Link to post
Share on other sites
I do them by hand as needed, and I don't use pre-compiled headers. They cause too many synchronization problems in VS.

Share this post


Link to post
Share on other sites
So when creating a new project do you just create new files and make all your own files, then save them to one folder?

I guess that will help a lot in terms of all the junk VS creates by default, but I am sure they ahve there purposes. Thats the way I did it in VS6.0

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!