Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 3.02 KB

how-to-create-a-resource.md

File metadata and controls

61 lines (42 loc) · 3.02 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
How to: Create a Resource | Microsoft Docs
11/04/2016
cpp-windows
article
C++
toolbars [C++], resources
resource toolbars
resources [Visual Studio], creating
aad44914-9145-45a3-a7d8-9de89b366716
13
mikeblome
mblome
ghogen

How to: Create a Resource

Note

Resource View is not supported in Express editions.

To create a new resource in Resource View

  1. With focus on your .rc file in Resource View, click the Edit menu and choose Add Resource (or right-click the .rc file in Resource View and choose Add Resource from the shortcut menu).

    Note If your project doesn't already contain an .rc file, please see Creating a New Resource Script File.

  2. In the Add Resource dialog box, choose the type of resource you'd like to add to your project.

To create a new resource in Solution Explorer

  1. In Solution Explorer, right-click the project folder and choose Add, then click Add Resource on the shortcut menu.

    If you do not already have an .rc file in your project, this step will create one. You can then repeat this step to add specific resource types to the new .rc file.

  2. In the Add Resource dialog box, choose the type of resource you'd like to add to your project.

To create a new resource in Class View

  1. In Class View, right-click your class and choose Add, then click Add Resource from the shortcut menu.

  2. In the Add Resource dialog box, choose the type of resource you'd like to add to your project.

To create a new resource from the Project menu

  1. From the Project menu, choose Add Resource.

When you create a new resource, Visual C++ assigns a unique name to it, for example, IDD_Dialog1. You can customize this resource ID by editing the properties for the resource either in the associated resource editor or in the Properties Window.

You can create a resource as a new default resource (a resource that is not based on a template) or as a resource patterned after a template.

For information on adding resources to managed projects, please see Resources in Desktop Apps in the .NET Framework Developer's Guide.

Requirements

Win32

See Also

Resource Files
Resource Editors
Add Resource Dialog Box