Class TWinResourceContainer

Unit

Declaration

type TWinResourceContainer = class(TMultiFileContainer)

Description

Container for Windows resources.

Example of modifying an existing RES file:

uses BGRAClasses, BGRABitmapTypes, BGRAWinResource;
var
  res: TMultiFileContainer;
  filestream: TStream;
begin
  res := TWinResourceContainer.Create('container.res'); //load the content of an existing RES file
  res.Delete('MAINICON','ico'); //delete current MAINICON entry
  filestream := TFileStream.Create('someicon.ico',fmOpenRead);
  res.Add('MAINICON','ico', filestream); //replace it with another icon
  filestream := TFileStream.Create('somecursor.cur', fmOpenRead);
  res.Add('SOMECURSOR','cur', filestream); //add a cursor entry called SOMECURSOR
  res.SaveToFile('container.res');
  res.Free;
end.

Hierarchy

Overview

Fields

Protected FHiddenEntries: TMultiFileEntryList;

Methods

Public destructor Destroy; override;
Public function IndexOf(AName: utf8string; AExtenstion: utf8string; ALanguageId: integer; ACaseSensitive: boolean = True): integer; overload;
Public function IndexOf(AName: utf8string; AExtenstion: utf8string; ACaseSensitive: boolean = True): integer; override;
Protected function CreateEntry(AName: utf8string; AExtension: utf8string; AContent: TStream): TMultiFileEntry; override;
Protected function CreateEntry(AName: utf8string; AExtension: utf8string; AContent: TStream; ALanguageId: integer): TMultiFileEntry; overload;
Public procedure Clear; override;
Public procedure Delete(AIndex: integer); override;
Public procedure LoadFromStream(AStream: TStream); override;
Public procedure SaveToStream(ADestination: TStream); override;
Protected procedure ClearHiddenEntries;
Protected procedure Init; override;
Protected procedure RemoveHidden(AEntry: TCustomResourceEntry);

Description

Fields

Protected FHiddenEntries: TMultiFileEntryList;

This item has no description.

Methods

Public destructor Destroy; override;

This item has no description.

Public function IndexOf(AName: utf8string; AExtenstion: utf8string; ALanguageId: integer; ACaseSensitive: boolean = True): integer; overload;

This item has no description.

Public function IndexOf(AName: utf8string; AExtenstion: utf8string; ACaseSensitive: boolean = True): integer; override;

This item has no description.

Protected function CreateEntry(AName: utf8string; AExtension: utf8string; AContent: TStream): TMultiFileEntry; override;

This item has no description.

Protected function CreateEntry(AName: utf8string; AExtension: utf8string; AContent: TStream; ALanguageId: integer): TMultiFileEntry; overload;

This item has no description.

Public procedure Clear; override;

This item has no description.

Public procedure Delete(AIndex: integer); override;

This item has no description.

Public procedure LoadFromStream(AStream: TStream); override;

This item has no description.

Public procedure SaveToStream(ADestination: TStream); override;

This item has no description.

Protected procedure ClearHiddenEntries;

This item has no description.

Protected procedure Init; override;

This item has no description.

Protected procedure RemoveHidden(AEntry: TCustomResourceEntry);

This item has no description.