[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Load icon data from a resource with the specified integer resource identifier.
Source position: graphics.pp line 1654
public procedure TCustomIcon.LoadFromResourceID( |
Instance: TLCLHandle; |
ResID: PtrInt |
); override; |
Instance |
|
Handle where the content for the resource is stored. |
ResID |
|
Integer resource identifier loaded in the method. |
LoadFromResourceID is an overridden procedure used to load a resource with the specified Resource ID into the class instance. LoadFromResourceID re-implements the method defined in the ancestor class, and does not call the inherited method.
Instance contains the handle used to read the resource. ResID contains an Integer pointer to the resource identifier loaded in the method.
LoadFromResourceID calls GetResourceType to get the Integer resource type used in the class instance. No actions are performed in the method when the TResourceType value is unassigned (contains Nil).
LoadFromResourceName calls FindResource to get the resource handle needed in the method. An EResNotFound exception is raised if a resource with the specified ID and type is not found in FindResource.
LoadFromResourceName calls LoadFromResourceHandle to load the icon using the Instance and resource handle values.
Use LoadFromResourceName to load a resource with a given resource name.
Use LoadFromLazarusResource to load a Lazarus resource from a .lrs file with a give name.
Raises an EResNotFound exception if the resource handle for the specified ID and type is not valid.
Modified in LCL version 4.0 to use the TLCLHandle type instead of the deprecated THandle type in the Instance parameter.
|
The type used for handles in LCL applications, components, controls, and widget set classes. |
Version 4.0 | Generated 2025-05-03 | Home |