Unit 'Graphics' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

CreateBitmapFromTyphonResource

Creates and loads a Bitmap from a Typhon Resource (.ctrs) file.

Declaration

Source position: graphics.pp line 2048

function CreateBitmapFromTyphonResource(

  const AName: string

):TCustomBitmap;

function CreateBitmapFromTyphonResource(

  const AName: string;

  AMinimumClass: TCustomBitmapClass

):TCustomBitmap;

function CreateBitmapFromTyphonResource(

  AHandle: TLResource

):TCustomBitmap;

function CreateBitmapFromTyphonResource(

  AHandle: TLResource;

  AMinimumClass: TCustomBitmapClass

):TCustomBitmap;

Arguments

AName

  

Name for the graphic resource loaded in the routine.

Function result

TCustomBitmap with the graphic content created in the routine.

Arguments

AName

  

Name for the graphic resource loaded in the routine.

AMinimumClass

  

Class type required to load the content for the specified resource. The default class type is TCustomBitmapClass.

Arguments

AHandle

  

Handle for the Typhon resource accessed in the routine.

Arguments

AHandle

  

Handle for the Typhon resource accessed in the routine.

AMinimumClass

  

Class type required to load the content for the specified resource. The default class type is TCustomBitmapClass.

Description

CreateBitmapFromTyphonResource is an overloaded TCustomBitmap function used to create and populate a bitmap with the content specified by the arguments to the routine.

The overloaded variants allow either a resource name (AName) or TLResource handle (AHandle) to be used to select the content for the bitmap. The variants with the AMinimumClass argument allow the class type for the graphic to be specified. TCustomBitmapClass is the default class type used in the overloaded variants.

CreateBitmapFromTyphonResource uses a temporary TTyphonResourcestream instance to load the content from the Typhon resource.

CreateBitmapFromTyphonResource is used in the implementation of routines like LoadBitmapFromTyphonResourceHandle and GetDefaultGlyph (in ImgList.pp).

See also

TCustomBitmap

  

TCustomBitmap - the base class for TBitmap.

TCustomBitmapClass

  

Class reference used to create new instances of TCustomBitmap.

LoadBitmapFromTyphonResourceHandle

  

Deprecated - technically a bitmap is created, not loaded.

GetDefaultGlyph

  

TTyphonResourcestream

  

TLResource

  



CT Web help

CodeTyphon Studio