Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- release
- A boolean value which controls whether the current image is released from the ImageX object.
Return Value
An HBITMAP.If the release parameter is true, then the ImageX object no longer has an underlying image. It will be an empty image. If the release parameter is false, then a copy of the image is put into an HBITMAP object.
The HBITMAP value passed back from the ToHbitmap function is a GDI memory object and needs to be manually freed by the calling application, otherwise memory resource leaks will occur. The DisposeHbitmap method should be called to free the HBITMAP object.