[Overview][Classes][Index] Reference for unit 'groupresource' (#fcl-res)


[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Abstract common class for group icon and group cursor classes


Source position: groupresource.pp line 29

type TGroupResource = class(TAbstractResource)


  fType: TResourceDesc;

  fName: TResourceDesc;

  fItemData: TStream;

  fItemList: TFPList;

  dummyType: TResourceDesc;

  dummyName: TResourceDesc;

  procedure FindSubResources;

  procedure ReadResourceItemHeader; virtual; abstract;

  procedure CheckBuildItemStream;

  function GetItemData;

  procedure WriteHeader(); virtual; abstract;

  function WriteResHeader;

  procedure CreateSubItems;

  procedure CreateSubItem; virtual; abstract;

  procedure UpdateItemOwner(); virtual; abstract;

  procedure ClearItemList; virtual; abstract;

  procedure DeleteSubItems; virtual; abstract;

  function GetSubStreamCount;

  function GetSubStream(); virtual; abstract;

  procedure SetOwnerList(); override;

  procedure NotifyResourcesLoaded; override;


  destructor Destroy; override;


  function CompareContents(); override;

  procedure SetCustomItemDataStream();


Sets a custom stream as the underlying stream for ItemData

  procedure UpdateRawData; override;

  property ItemData: TStream; [r]


Resource data as an ICO/CUR stream





Abstract common class for group icon and group cursor classes




Base abstract resource class




This class provides common functionalities that are extended by TGroupIconResource and TGroupCursorResource.

Resources of type RT_GROUP_ICON and RT_GROUP_CURSOR represent a .ico or .cur file, respectively. However, data isn't contained in a single resource, but it's scattered over several different resources. That is, a .ico file contains an icon, which is made of several different images (for different sizes and color depth); when it is represented as a resource, however, the RT_GROUP_ICON resource only contains information about the single images, which are contained each in a different resource of type RT_ICON. The single resources are pretty unuseful alone, since they only consist of raw image data: they must be accessed in the contest of the RT_GROUP_ICON resource, which provides information about them.

TGroupIconResource and TGroupCursorResource provide a way to handle resources of these types as if they were .ico or .cur files. This class implements common functionalities, since icons and cursors are very similar.

Remark: An object of this class should never be directly instantiated: use a descendant class instead.

See also



Group icon resource type



Group cursor resource type

Documentation generated on: May 14 2021