Share via


Using Resource Templates

Home Page (Resource Editors)OverviewHow Do I ... Topics

A template file is a copy of an edited resource that you can use to create additional resources. Resource templates save time in developing additional resources or groups of resources that share a particular feature.

For instance, you might want to include a Help button and an icon of a company logo in several dialog boxes. Create a new template, and customize that template dialog box with the logo and Help button. Now, when you want to create a new dialog box, you can choose this template dialog box with the features already added.

What do you want to do?

Create templates for resources

Create new resources from templates

To create templates for resources

  1. From the Insert menu, choose Resource.

  2. Select a resource from the Resource Type box, and click New.

    -or-

    Copy a resource from another resource file. For more information, see Copying Resources.

  3. Modify the resource.

    This resource, once saved as a template, can be copied numerous times to save effort on positioning controls, inserting text, and so on.

  4. From the File menu, choose Save As.

  5. In the Save File As Type box, select Resource Template (*.rct).

  6. Select the Template subdirectory under the SharedIDE subdirectory in your Visual C++ installation.

  7. Click Save to save the template. Repeat for any remaining templates.

To create new resources from the templates

  1. From the Insert menu, choose Resource.

  2. Select a resource type. Double-click the resource icon to create a default resource template object.

    -or-

    Click the plus sign (+) next to a resource to move down the hierarchy to the template files grouped under that resource. Then double-click the specific template file under that resource to create a resource template object.