Bitmap.Handle Property

Gets a GDI handle to this bitmap (HBITMAP).

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)


public IntPtr Handle { get; }

Property Value

The handle to this bitmap.


A handle to bitmap (HBITMAP) is often needed when it is necessary to use GDI functions to deal with the bitmap (as well as certain WinAPI functions which are responsible for the user interface rendering).


HBITMAP is available only if the bitmap is GDI-compatible, i.e. it has a pixel format which is supported by GDI. In other words, it will work for indexed bitmaps, as well as for 24-bit and 32-bit RGB bitmaps. If you have, say, CMYK bitmap, you should convert it to some GDI-compatible pixel format before using this property.

See Also