Table of Contents

Method CreateCompatibleDC

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

CreateCompatibleDC(nint)

Creates a memory device context (DC) compatible with the specified device context.

public static extern nint CreateCompatibleDC(nint hdc)

Parameters

hdc nint

A handle to an existing device context. If this parameter is null, the function creates a memory DC compatible with the application's current screen.

Returns

nint

A handle to the newly created memory device context if the operation succeeds; otherwise, Zero.

Remarks

The memory DC can be used for off-screen drawing and is compatible with the device context specified by hdc. After using the memory DC, it must be deleted by calling the DeleteDC function to release system resources.