Export (0) Print
Expand All
21 out of 27 rated this helpful - Rate this topic

Resource-Definition Statements

The resource-definition statements define the resources that the resource compiler puts in the resource (.Res) file. After the .Res file is linked to the executable file, the application can load its resources at run time as needed. All resource statements associate an identifying name or number with a given resource.

The resource-definition statements can be divided into the following categories:

  • Resources
  • Controls
  • Statements

The following tables describe the resource-definition statements.

Resources

ResourceDescription
ACCELERATORS Defines menu accelerator keys.
BITMAP Defines a bitmap by naming it and specifying the name of the file that contains it. (To use a particular bitmap, the application requests it by name.)
CURSOR Defines a cursor or animated cursor by naming it and specifying the name of the file that contains it. (To use a particular cursor, the application requests it by name.)
DIALOG Defines a template that an application can use to create dialog boxes.
DIALOGEX Defines a template that an application can use to create dialog boxes.
FONT Specifies the name of a file that contains a font.
HTML Specifies an HTML file.
ICON Defines an icon or animated icon by naming it and specifying the name of the file that contains it. (To use a particular icon, the application requests it by name.)
MENU Defines the appearance and function of a menu.
MENUEX Defines the appearance and function of a menu.
MESSAGETABLE Defines a message table by naming it and specifying the name of the file that contains it. The file is a binary resource file generated by the message compiler.
POPUP Defines a menu item that can contain menu items and submenus.
PLUGPLAYObsolete.
RCDATA Defines data resources. Data resources let you include binary data in the executable file.
STRINGTABLE Defines string resources. String resources are Unicode or ASCII strings that can be loaded from the executable file.
TEXTINCLUDEA special resource that is interpreted by Visual C++. For more information, see TN035.
TYPELIBA special resource that is used with the /TLBID and /TLBOUT linker options.
User-Defined Defines a resource that contains application-specific data.
VERSIONINFO Defines a version-information resource. Contains information such as the version number, intended operating system, and so on.
VXDObsolete.

 

For more information about predefined MFC resources, see TN023 and TN024.

Controls

ControlDescription
AUTO3STATE Creates an automatic three-state check box control.
AUTOCHECKBOX Creates an automatic check box control.
AUTORADIOBUTTON Creates an automatic radio button control.
CHECKBOX Creates a check box control.
COMBOBOX Creates a combo box control.
CONTROL Creates an application-defined control.
CTEXT Creates a centered-text control.
DEFPUSHBUTTON Creates a default pushbutton control.
EDITTEXT Creates an edit control.
GROUPBOX Creates a group box control.
ICON Creates an icon control. This control is an icon displayed in a dialog box.
LISTBOX Creates a list box control.
LTEXT Creates a left-aligned text control.
PUSHBOX Creates a push box control.
PUSHBUTTON Creates a push button control.
RADIOBUTTON Creates a radio button control.
RTEXT Creates a right-aligned control.
SCROLLBAR Creates a scroll bar control.
STATE3 Creates a three-state check box control.

 

Statements

StatementDescription
CAPTION Sets the title for a dialog box.
CHARACTERISTICS Specifies information about a resource that can be used by tool that can read or write resource-definition files.
CLASS Sets the class of the dialog box.
EXSTYLE Sets the extended window style of the dialog box.
FONT Sets the font with which the system will draw text for the dialog box.
LANGUAGE Sets the language for all resources up to the next LANGUAGE statement or to the end of the file. When the LANGUAGE statement appears before the beginning of the body of an ACCELERATORS, DIALOG, MENU, RCDATA, or STRINGTABLE resource definition, the specified language applies only to that resource.
MENU Sets the menu for the dialog box.
MENUITEM Defines a menu item.
STYLE Sets the window style for the dialog box.
VERSION Specifies version information for a resource that can be used by tool that can read or write resource-definition files.

 

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.