This note describes the standard resources provided with and needed by the MFC library.
Standard Resources
MFC offers two categories of predefined resources that you can use in your application: clip-art resources and standard framework resources.
Clip-art resources are additional resources that the framework does not depend on, but which you might want to add to your application's user interface. The following clip-art resources are contained in the MFC General sample CLIPART:
Standard framework resources are resources with AFX-defined IDs that the framework depends on for internal implementations. You will rarely need to change these AFX-defined resources. If you do, you should follow the procedure outlined below.
The following framework resources are contained in the MFC\INCLUDE directory:
Using Clip-Art Resources
To use a clip-art binary resource:
To use other clip-art resources, the steps are as above except you open the appropriate .RC file instead of COMMON.RC. Renaming the resource ID is not needed since the clip-art resources will already be assigned the appropriate symbols for you.
Note Be careful not to unintentionally move resources out of COMMON.RC permanently. You can avoid this by CTRL-dragging (copy) rather than straight dragging (move the resources). You can also avoid this by always responding with "No" when you're asked whether you want to save the changes to COMMON.RC.
The .RC resource files have a special TEXTINCLUDE resource in them that will prevent you from accidentally saving on top of the standard .RC files.
Customizing Standard Framework Resources
Standard framework resources are usually #include'd in your application's .RC file. AppWizard will generate a .RC file that includes the appropriate standard framework resources depending on which AppWizard options you choose. You can review, add, or remove which resources are #include'd by using Visual C++'s "Set Includes..." command in the Resource menu of Visual C++ and looking at the "Compile-Time Directives" edit item. For example:
#include "afxres.rc"
#include "afxprint.rc"
The most common case of customizing standard framework resources is adding or removing additional includes for printing, OLE Client, and OLE Server support.
In some rare case you may wish to customize the contents of the standard framework resources for your particular application, not just add and remove the entire file.
To customize the contents of a standard resource file, please follow these steps:
Open your application's resource file in Visual C++.