Resource Editor

Welcome to the Resource Editor project page.

The resource editor in its current form is a stand alone application. It was originally designed to be integrated with and embedded into the Delphi IDE but the necessary Delphi APIs are currently not available for this to work properly. I will revive the integrated solution if Embarcadero ever implement the required APIs.

The motivation behind the development of the resource editor was the continuing lack of such a tool in Delphi and my surprise when it turned out that Delphi 2009 wouldn’t include one as some of us had expected it would.

Note

Please note that this is currently a blind page with no incoming links. Although there are no secrets here I request that you do not link to this page - yet.

The primary focus of the resource editor is RES files with a heavy bias toward the resource types commonly used by Delphi developers, but all common resource file formats and resource types are supported.

For now the resource editor is freeware. I have not decided what to do with it in the future. I may decide to turn it into a commercial product if I can find anyone willing to market it (I’m no good at that myself), I may decide to open source it or I may grow tired of it and just burn the disks - so to speak.

Overview

The resource edit window is separated into a number of panes. The functionality of each pane is described below (the screen shots are a bit outdated).

Panes - Overview

 Properties pane

Properties pane

The property editor is used to view and edit the properties of a resource item.

Most resource types have properties that only apply to that particular resource types, but all types have the ID, Name, Language and Type properties.

The ID and Name properties are mutually exclusive. The ID property is used to specify the Resource ID as an integer and the Name property is used to specify it as a string value. The Resource Editor automatically assigns an unique integer value ID to new resource items when they are created.

The Language property specifies the Locale the resource item is localized for. The default value is Language Neutral which means that the resource item can be used with all locales.

The Type property specifies the resource item type. Only the RCDATA and Generic resource item types allows the value to be modified.

This pane only exists in the stand alone resource editor. When the resource editor is hosted in the Delphi IDE the IDE’s property editor is used.

Resources pane

Resources pane

The resources tree view lists all the different resource items contained in the resource file, grouped by resource type.

Resource items can be added, deleted, loaded or saved from the drop down menu or from the context menu.

Variants pane

Variants pane

The variants pane lists the different versions of a resource item.

Each item in the list will have the same ID or name, but can have different language, color depth or dimensions. The resource editor does not enforce uniqueness among the variants.

Frames pane

Frames pane

For those resource item types that support frames (e.g. the animated cursor type) the frames pane lists the individual frames.

Preview pane

Preview pane

The preview pane displays the content of the selected resource item

The resource editor is able to display most resources types in their human readable form using specialized viewers. For example HTML documents are displayed in an embedded browser, AVI data is displayed in an embedded video player.

Unknown resource types are displayed with either a HEX viewer or a generic text viewer.

Resource Editor pane

Resource Editor pane

The resource editor pane is where the resource item is modified.

Like the preview pane, the editor pane uses resource editors that are specialized for the individual resource type; Image types are edited with a bitmap editor, text types with a text editor, etc.

Unknown resource types are edited with either a HEX editor or a generic text editor.

Features

Resource Modules

Module type Read Write Comment
RES file Yes Yes
PE module Yes Yes PE modules are compiled Windows binaries such as EXE, DLL, SCR, OCX, BPL, etc.
RC script Yes Yes Supports all RC file features such as include files and symbolic values. Both Ansi and Unicode RC files are supported.
Module writer has certain limitations. See Status section.
The RC script reader uses Microsoft’s RCDLL.DLL (part of Microsoft’s RC resource compiler). This is the same method used by Visual Studio to read RC scripts. Because of this the RC script reader has the same features as Visual Studio.

Resource Types

Generally all resource types are supported in the sense that they can be defined, read and written. However since this is a resource editor and not just a glorified RC script front end, most resource types can also be edited and/or viewed with a specialized editor or viewer. For instance, for the image resource types, the resource items can be loaded and saved to and from their native image file format, but they can also be edited in the integrated image editor and the image properties (color depth, height, width, etc.) can be edited with the property editor.

The following table lists some of the different resource types that are handled natively.

Resource type Editor Viewer
Bitmap Yes Yes Supports colors depths of 1, 4, 8, 24 and 32 bits.
Cursor Yes Yes Supports colors depths of 1, 4, 8, 24 and 32 bits.
Supports both the traditional format and the newer (Vista) compressed format.
Icon Yes Yes Supports colors depths of 1, 4, 8, 24 and 32 bits.
Supports both the traditional format and the newer (Vista) compressed format.
String list Yes Yes
Message table Yes Yes
Manifest Yes Yes Supports all current XP, Vista and Windows 7 features.
Accelerator No Yes Accelerators can be edited through the property inspector’s collection editor.
Menu Yes Yes  
Dialog Yes No
Version Info Yes Yes
Animated Cursor Yes Yes
Animated Icon Yes Yes
Font No Yes
HTML Yes Yes HTML is edited as text.
GIF Yes Yes Supports animated GIFs.
Supports colors depths of 1-8 bits.
PNG Yes Yes Supports colors depths of 1, 4, 8, 24 and 32 bits.
JPG, WMF, EMF No Yes
Compressed BMP No Yes An example of compressed bitmaps are Delphi’s Ribbon skin bitmaps.
ZLib compressed bitmaps are supported.
Media files (AVI, WAV, etc) No Yes
Type Library No Yes
RCDATA No No The viewer and editor used depends on the actual data contained in the RCDATA item.
Delphi Form No Yes Forms are viewed as text.
Delphi Package Info No Yes
Delphi Package Description Yes Yes
MFC Toolbar No Yes Toolbar items can be edited through the generic collection editor.
(generic binary format) Yes Yes Binary data is viewed and edited as HEX.
(generic text data) Yes Yes Text data is viewed and edited as ASCII or Unicode (UTF8, UTF16 or UCS16).

Technology

The resource editor is written entirely in Delphi XE and supports Windows XP and later. The source code consist of +300K lines of code and has no dependencies on commercial libraries.

Where possible I have used the standard VCL controls and components, but otherwise custom made or customized components or libraries are used. Notably:

Status

Known problems

  • Docking
    • The docking suffers from many of the bugs present in Delphi’s standard docking manager. See QC for details.
      I have probably spent more time trying (mostly unsuccessfully) to work around the docking manager behavior than any other feature in the entire application.
  • Bitmap editor
    • Some PSD (PhotoShop) files can cause an Access Violation.

Incomplete features

  • Dialog designer
    • Not all control types have specialized properties for the Style and ExStyle values.
    • The toolbar needs a little love.
  • Bitmap editor
    • The Emboss filter is incomplete.
  • RC module
    • Symbolic values
      • It is not possible to move symbols between include files.
      • It is not possible to filter the symbol list view.
    • Module writer
      • RT_DIALOG and RT_MENU item properties are written using their generic format.
      • All menu resources are written as MENUEX types. The MENU type isn’t supported
        This might cause problems in the application using the resource since the binary format of the two types are different.
      • When saving a RC file in Ansi encoding it should be possible to specify which codepage to use.

Missing (but planned) features

  • The stand alone host application needs some GUI work
    • Menu should be populated with common shortcuts (Copy/Paste, Options, etc).
    • A toolbar should be added with ditto.
    • Tabbed docking (unlikely unless Embarcadero adds the feature to the VCL or someone sends me the source - I’m done messing with the &!#*§$@ VCL docking manager).
  • Resource types
    • View DFM (Delphi form) resource as form.
    • Viewer for Delphi PACKAGEOPTIONS resource.
    • The DLGINIT resource type.
  • Bitmap Editor
    • Text tool.
    • Procedural brush.
    • Brush dynamics.
    • User defined brush shapes.

License

Creative Commons License
This work is freeware and is licensed under a
Creative Commons Attribution-Share Alike 3.0 Unported License.

Download

download
Download: Resource Editor
Version: 0.9.0.834
Updated: 10 September, 2011
Size: 5.29 MB
Notes: Resource Editor for RES, RC, EXE and DLL files. Supports most common resource types. Note: This is BETA software.
Downloads: 98,331

Screenshots

The screen shots are a bit outdated.

Bitmap editor - Editing Bitmap resourceBitmap editor - Editing Cursor resourceBitmap editor - Editing Icon resourceBitmap editor - Editing animated cursor resourceManifest editor - GeneralManifest editor - Execution LevelManifest editor - User Interface AccessManifest editor - DPI awarenessManifest editor - CompatibilityManifest editor - XMLString List editorText editor - ANSIText editor - UnicodeMessage Table editorVersion Info editorDelphi Package Info viewFont viewImage viewer - GIFImage viewer - JPGImage viewer - PNGImage viewer - WMFHTML viewerMedia viewer - VideoType Library viewer

Links

These are some of the existing resource or icon/cursor editors I know of.

Written in Delphi

  • XN Resource Editor by Colin Wilson
    Freeware. Source available.
    Very popular among the Delphi community. Most freeware and commercial resource editors written in Delphi are based (unattributed) on Colin Wilson’s source.
    Hasn’t been updated recently.
  • ResourceHacker by Angus Johnson
    Freeware.
    Very popular. No longer maintained.
  • ResEd by The Unknown Ones
    Freeware. Source available.
    Sort of integrates with the Delphi 2005-2010 IDE.
    Based on Colin Wilson’s source.
  • SiComponents: Resource Builder
    Commercial.
  • Sib Icon Editor and Cursor Editor
    Commercial. Icon & Cursor editor.
    Based on Colin Wilson’s source.
  • Heaventools: Resource Tuner
    Commercial. Only works on PE modules (EXE, DLL, etc).

Other