INFO: Converting an RC File to Use Microsoft Foundation Classes (99391)



The information in this article applies to:

  • Microsoft Visual C++ for Windows, 16-bit edition 1.0
  • Microsoft Visual C++ for Windows, 16-bit edition 1.5
  • Microsoft Visual C++, 32-bit Editions 1.0
  • Microsoft Visual C++, 32-bit Editions 2.0
  • Microsoft Visual C++, 32-bit Editions 4.0
  • Microsoft Visual C++, 32-bit Editions 5.0
  • Microsoft Visual C++, 32-bit Editions 6.0

This article was previously published under Q99391

SUMMARY

In App Studio (or Developer Studio in Visual C++ version 4.0 and later), the ClassWizard button on the toolbar and the ClassWizard menu option are disabled if the currently loaded RC file is not enabled for the Microsoft Foundation Classes. App Studio creates an RC file that is not enabled when it converts an old-style RC file to an App Studio RC file or when the user removes the selection from the "Use Microsoft Foundation Classes" option when creating an RC file in App Studio.

In addition, an RC file that is not enabled for the Microsoft Foundation Classes cannot contain any VBX controls.

MORE INFORMATION

To convert an RC file that is not enabled for the Microsoft Foundation Classes to one that is enabled, perform the following five steps:

  1. Load the RC file into App Studio.
  2. For Visual C++ for Windows or Visual C++, 32-bit Edition, versions 1.0 and 2.0, choose Set Includes from the File menu. For Visual C++, 32-bit Editions, version 4.0 and later, choose Resource Includes from the View menu.
  3. In the Read-Only Symbol Directives window, replace the following lines:
          #define APSTUDIO_HIDDEN_SYMBOLS
          #include "windows.h"
          #undef APSTUDIO_HIDDEN_SYMBOLS
    						
    with:
          #include "afxres.h"
    							
  4. Save the RC file and close it.
  5. Load the RC file into App Studio or Developer Studio.
The Resource Script is now enabled for Microsoft Foundation Classes.

Modification Type:MajorLast Reviewed:12/8/2003
Keywords:kbinfo KB99391