RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBitmap.Handle Property

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

Pascal
property Handle: HBITMAP;
C++
__property HBITMAP Handle;

Use Handle to call a Windows API function that requires the handle of a bitmap object. 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 TBitmap.::ReleaseHandle.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!