Retrieves an hBitmap for a FreeImage bitmap. Call FreeHbitmap(IntPtr) to free the handle.

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static IntPtr GetHbitmap(
	FIBITMAP dib,
	IntPtr hdc,
	bool unload
)
Visual Basic (Declaration)
Public Shared Function GetHbitmap ( _
	dib As FIBITMAP, _
	hdc As IntPtr, _
	unload As Boolean _
) As IntPtr
Visual C++
public:
static IntPtr GetHbitmap(
	FIBITMAP dib, 
	IntPtr hdc, 
	bool unload
)

Parameters

dib
Type: FreeImageAPI..::.FIBITMAP
Handle to a FreeImage bitmap.
hdc
Type: System..::.IntPtr
A reference device context. Use IntPtr.Zero if no reference is available.
unload
Type: System..::.Boolean
When true dib will be unloaded if the function succeeded.

Return Value

The hBitmap for the FreeImage bitmap.

Exceptions

ExceptionCondition
System..::.ArgumentNullException dib is null.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also