[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TCustomIcon.SetHandle

Unshares an existing shared image handle and set the new value.

Declaration

Source position: graphics.pp line 1650

protected procedure TCustomIcon.SetHandle(

  AValue: THandle

); override;

Arguments

AValue

  

New value for the shared image handle in the icon.

Description

SetHandle is a method used to set set the value for the shared image handle in the icon instance. It ensures that an existing shared image handle frees both its canvas context and the data in its TSharedImage instance.

It calls UpdateHandle to set the new shared handle for the icon instance to AValue. Values in Current and Count are reset when the handle is changed. Current is set 0 when multiple images are used in the icon. It is set to -1 when a single image is present. Changed is called to update the value in Modified and signal the OnCHange event handler (when assigned).

See also

TRasterImage.SetHandle

  

Sets the Handle used for the image.


Version 3.2 Generated 2024-02-25 Home