Converting an RC File to Use Microsoft Foundation Classes

Last reviewed: October 10, 1997
Article ID: Q99391
1.00 1.50 | 1.00 2.00 4.00
WINDOWS   | WINDOWS NT
kbtool kbfasttip

The information in this article applies to:

  • The App Studio included with:

        - Microsoft Visual C++ for Windows, versions 1.0 and 1.5
        - Microsoft Visual C++, 32-bit Edition, version 1.0, 2.0, and 4.0
    

SUMMARY

In App Studio (or Developer Studio in Visual C++ version 4.0), 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 Edition, version 4.0, 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.

The window title reads "FILENAME (MFC Resource Script)" to indicate that the file is enabled for the Microsoft Foundation Classes.


Additional reference words: kbinf 1.00 1.50 2.00 4.00
KBCategory: kbtool kbfasttip
KBSubcategory: AppStudioIss
Keywords : AppStudioIss kbfasttip kbtool
Technology : kbMfc
Version : 1.00 1.50 | 1.00 2.00 4.00
Platform : NT WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.