Click here to Skip to main content
Click here to Skip to main content

Tips for Visual C++ Developers

By , 16 Sep 2002
 

Introduction

These are a collection of tips that I found really useful for VC++ developers. This collection of tips uses the explorer shell to execute batch commands. To use these tips, you only need to merge the .reg file (using Microsoft Explorer), then the new command will be available for you to use.

Register/Unregister

The first tips helps to register/unregister ActiveX/COM component on your computer. Someone else posted a similar article a while ago, but now at least you can download it here. This tip can be used when you right click on a DLL file to register or unregister your component. The section for dependency walker (Depends.exe) is not really necessary since Depends will automatically add these to your registry.

REGEDIT4

[HKEY_CLASSES_ROOT\dllfile\shell]

[HKEY_CLASSES_ROOT\dllfile\shell\RegSvr32]

[HKEY_CLASSES_ROOT\dllfile\shell\RegSvr32\Command]
@="Regsvr32.exe %1"

[HKEY_CLASSES_ROOT\dllfile\shell\UnRegSvr32]

[HKEY_CLASSES_ROOT\dllfile\shell\UnRegSvr32\Command]
@="Regsvr32.exe /u %1"

[HKEY_CLASSES_ROOT\dllfile\shell\View Dependencies]

[HKEY_CLASSES_ROOT\dllfile\shell\View Dependencies\command]
@="DEPENDS.EXE /dde"

[HKEY_CLASSES_ROOT\dllfile\shell\View Dependencies\ddeexec]
@="[open(\"%1\")]"

Delete Temporary files

This next tip allows you to delete most of the temporary files created with VC++. You can add other files in this list too. Class Wizard file (.clw) was not included in this list since it can useful for most of us. To use this tips, you will have to right click on a "folder" this time. It will delete all VC++ temporary files including sub directories.

REGEDIT4

[HKEY_CLASSES_ROOT\Folder\shell\Delete Temp VC++ files]

[HKEY_CLASSES_ROOT\Folder\shell\Delete Temp VC++ files\command]
@="\"cmd.exe\" \"/c del /s *.obj,*.res;*.pch;*.pdb;*.tlb;*.idb;*.ilk;
    *.opt;*ncb;*.sbr;*.sup;*.bsc\""

Rebuild from Explorer

This tip allows you to build your project from Explorer. This is really cool if you don't have too many configurations. Just right click a DSP or DSW file to do it; presto! This tip was first inspired by a joke, but now at least we all can laugh! :-)

REGEDIT4

[HKEY_CLASSES_ROOT\dspfile\shell\Rebuild All]

[HKEY_CLASSES_ROOT\dspfile\shell\Rebuild All\command]
@="\"Cmd.exe\" \"/C Start MSDev %1 /REBUILD /MAKE ALL\""

[HKEY_CLASSES_ROOT\dswfile\shell\Rebuild All]

[HKEY_CLASSES_ROOT\dswfile\shell\Rebuild All\command]
@="\"Cmd.exe\" \"/C Start MSDev %1 /REBUILD /MAKE ALL\""

Conclusion

I hope you enjoyed these tips. My favorite is "Delete Temp VC++ files", which one is yours?

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Ernest Laurentin
Software Developer (Senior)
United States United States
Member
Ernest is a multi-discipline software engineer.
Skilled at software design and development for all Windows platforms (starting Windows 3.11),
Windows CE and cross-platform UI development.
-
MCSD (C#, .NET)
Interests: User Interface, GDI/GDI+, Scripting, Windows CE .NET.
Programming Skills: C/C++, C#, Java, VB and ASP.NET.
 
I hope you will enjoy my contributions.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralVery usefulmemberMichael P Butler17 Sep '02 - 22:33 
Thanks for the article. These are the kind of things that I'm always wanting to do but never get around to figuring out the best way to do it.
 

 
Michael
 

Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
GeneralRe: Very usefulmemberErnest Laurentin18 Sep '02 - 4:33 
Thanks!
 
Why are you in Y? they asked! Well think again Poke tongue | ;-P
GeneralFastest rated articlememberErnest Laurentin17 Sep '02 - 6:40 
This is the fastest rated "article" that I've ever had. Since I didn't really want to post it as an article, I don't really mind (Big Grin | :-D ) but I think it may be useful to others. So my conclusion: Give your suggestions about tips that you would like to see in there instead to prevent others to see it.
GeneralRe: Fastest rated articlememberNemanja Trifunovic17 Sep '02 - 7:09 
Hehe, actually the article is great, but the title is a bit misleading - I believe that is the main reason for bad rating.
 
Beer | [beer]
GeneralRe: Fastest rated articlememberErnest Laurentin17 Sep '02 - 7:28 
Hmmm, What title would you say? (I don't really care about the rating unless if I think
it may prevent others to find something useful). I think the problem may be more a "section" problem, I could not find correct section for this but "Programming Tips" seems more right.
Thanks Nemanja! Wink | ;) BTW, which one you prefer?
GeneralRe: Fastest rated articlememberBrigg Thorp17 Sep '02 - 7:37 
Maybe "Registry Tweaks for Visual C++ Development."
 
Brigg Thorp
Software Engineer
Timex Corporation
GeneralRe: Fastest rated articlememberErnest Laurentin17 Sep '02 - 7:54 
Yeah! good one too! but I may update it with other tips that are not "Registry" related

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 17 Sep 2002
Article Copyright 2002 by Ernest Laurentin
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid