How to set a different file name extension on files to be opened by the Visual C++ editor in Visual Studio .NET and in Visual Studio 2005

Article translations Article translations
Article ID: 839287 - View products that this article applies to.
Expand all | Collapse all

INTRODUCTION

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry


If you want the Visual C++ editor to treat files as Visual C++ files, you must specify the file name extensions in the NCB Default C/C++ Extensions key in Microsoft Visual Studio 2005, in Microsoft Visual Studio .NET 2003, and in Microsoft Visual Studio .NET 2002. When the editor treats the files as Visual C++ files, the files are colorized, and Microsoft IntelliSense is established on the files. The following is the registry key that contains these values:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Languages\Language Services\C/C++
For a file type to be treated as a Microsoft Interface Definition Language (IDL) file, the file name extension must be specified in the NCB Default IDL Extensions key. The following is the registry key that contains these values:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Languages\Language Services\C/C++
The following is an example of the values that this registry key typically holds:
NCB Default C/C++ Extensions=".cpp;.cxx;.c;.cc;.h;.hh;.hxx;.hpp;.inl;.tlh;.tli;"
NCB Default IDL Extensions=".odl;.idl;.odh"

MORE INFORMATION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

If you want the Visual C++ editor to treat a file type as a Visual C++ file, modify the value of the NCB Default C/C++ Extensions key. If you want a file type to be treated as an IDL file, modify the value of the NCB Default IDL Extensions key.

To modify the registry, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the registry key that you want to modify.
  3. Right-click the key, click Modify, type the value, and then click OK.

REFERENCES

For additional information, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/8c5ztk84(vs.71).aspx

Properties

Article ID: 839287 - Last Review: March 19, 2007 - Revision: 3.2
APPLIES TO
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET 2003 Standard Edition
  • Microsoft Visual C++ .NET 2002 Standard Edition
Keywords: 
kbsettings kbide kbhowto kbinfo KB839287

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com