Vcl.Graphics.TBitmap.Handle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Handle: HBITMAP read GetHandle write SetHandle;

C++

__property HBITMAP Handle = {read=GetHandle, write=SetHandle, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TBitmap

Description

Provides access to the Windows GDI bitmap handle for accessing the GDI bitmap object.

Use Handle to call a Windows API function that requires the handle of a bitmap object (HBITMAP). Pass Handle as the bitmap handle parameter to these functions.

Handle is the HBITMAP encapsulated by the bitmap object. Avoid grabbing the handle directly since it causes the HBITMAP to be copied if more than one TBitmap shares the handle.

Warning: Be careful when giving the handle to an object or routine. If the receiver takes ownership (and destroys) the bitmap handle, call ReleaseHandle.

See Also

Code Examples