Microsoft KB Archive/839287

= 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 ID: 839287

Article Last Modified on 3/19/2007

-

APPLIES TO


 * Microsoft Visual C++ 2005 Express Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition

-





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:

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:

The following is an example of the values that this registry key typically holds:

NCB Default C/C++ Extensions=&quot;.cpp;.cxx;.c;.cc;.h;.hh;.hxx;.hpp;.inl;.tlh;.tli;&quot;

NCB Default IDL Extensions=&quot;.odl;.idl;.odh&quot;



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.

