Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 2.59 KB

creating-a-new-custom-or-data-resource.md

File metadata and controls

50 lines (36 loc) · 2.59 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Creating a New Custom or Data Resource | Microsoft Docs
11/04/2016
cpp-windows
article
vc.editors.binary
C++
custom resources [C++]
data resources [C++]
resources [Visual Studio], creating
9918bf96-38fa-43a1-a384-572f95d84950
13
mikeblome
mblome
ghogen

Creating a New Custom or Data Resource

You can create a new custom or data resource by placing the resource in a separate file using normal resource script (.rc) file syntax, and then including that file by right-clicking your project in Solution Explorer and clicking Resource Includes on the shortcut menu.

To create a new custom or data resource

  1. Create a .rc file that contains the custom or data resource.

    You can type custom data in a .rc file as null-terminated quoted strings, or as integers in decimal, hexadecimal, or octal format.

  2. In Solution Explorer, right-click your project's .rc file, then click Resource Includes on the shortcut menu.

  3. In the Compile-Time Directives box, type a #include statement that gives the name of the file containing your custom resource. For example:

   #include mydata.rc  
 Make sure the syntax and spelling of what you type are correct. The contents of the **Compile-Time Directives** box are inserted into the resource script file exactly as you typed them.  
  1. Click OK to record your changes.

Another way to create a custom resource is to import an external file as the custom resource. For more information, see Importing and Exporting Resources.

For information on adding resources to managed projects, please see Resources in Desktop Apps in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resource strings to properties, see Creating Resource Files for Desktop Apps. For information on globalization and localization of resources in managed apps, see Globalizing and Localizing .NET Framework Applications.

Requirements

Win32

See Also

Binary Editor