In
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, resources are
read-only data
In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted ...
embedded in
portable executable
The Portable Executable (PE) format is a file format for executables, object code, DLLs and others used in 32-bit and 64-bit versions of Windows operating systems. The PE format is a data structure that encapsulates the information necessary fo ...
files like
.exe
.exe is a common filename extension denoting an executable file (the main execution point of a computer program) for Microsoft Windows, OS/2, and DOS.
File formats
There are numerous file formats which may be used by a file with a extensi ...
,
DLL,
CPL,
SCR,
SYS or (beginning with Windows Vista)
MUI files.
The
Windows API
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
provides for easy access to all applications resources.
Types
Each resource has a type and a name, both being either numeric identifiers or strings.
Windows has a set of predefined resource types:
*
Cursor
Cursor may refer to:
* Cursor (user interface), an indicator used to show the current position for user interaction on a computer monitor or other display device
* Cursor (databases), a control structure that enables traversal over the records in ...
and animated cursor
*
Icon
An icon () is a religious work of art, most commonly a painting, in the cultures of the Eastern Orthodox, Oriental Orthodox, and Catholic churches. They are not simply artworks; "an icon is a sacred image used in religious devotion". The most ...
*
Bitmap
In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array
A bit array (also known as bitmask, bit map, bit set, bit string, or bit vector) is an array data structure that c ...
*
Dialog box
The dialog box (also called dialogue box (non-U.S. English), message box or simply dialog) is a graphical control element in the form of a small window that communicates information to the user and prompts them for a response.
Dialog boxes are ...
template
*
Font
In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a "sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design.
In mod ...
*
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
document
*
String and message template
* Version data
* Manifest data
* arbitrary (binary) data
The programmer can also define custom data types in resources.
Usage
The icon that Windows displays for a program file is actually the first icon resource in its EXE file. If the EXE file has no icon resources, a standard icon is displayed.
The version resource for EXE and DLL files is displayed in the ''Version'' tab of their property pages.
Resources always have a language attached to them, and Windows will automatically use the most fitting language if possible. This allows for programs adapting their language to the locale of the user.
Editor
Editing is the process of selecting and preparing written, photographic, visual, audible, or cinematic material used by a person or an entity to convey a message or information. The editing process can involve correction, condensation, orga ...
s are available that can modify resources embedded in EXE or DLL files. These are typically used to translate all strings of an application to another language, or to modify its icons and bitmaps accordingly.
References
External links
MSDN: Windows Resource Files GuideMSDN: Better Resource File Guide with reference
{{Wikibooks, Windows Programming, Resource Script Reference
Windows architecture