Gdi32CreateCompatibleBitmap(SafeHandle, Int32, Int32) Method

Creates a bitmap compatible with the device that is associated with the specified device context.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll")]
public static IntPtr CreateCompatibleBitmap(
	SafeHandle hdc,
	int width,
	int height
)

Parameters

hdc  SafeHandle
A handle to the Device Context (DC).
width  Int32
The bitmap width, in pixels.
height  Int32
The bitmap height, in pixels.

Return Value

IntPtr
If the function succeeds, the return value is a handle to the compatible bitmap (DDB).

If the function fails, the return value is Zero.

Remarks

See Also