Gdi32SelectObject(SafeHandle, SafeHandle) Method

Selects an object into a specified device context.

The new object replaces the previous object of the same type.

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", CharSet = CharSet.Auto)]
public static IntPtr SelectObject(
	SafeHandle hdc,
	SafeHandle hObject
)

Parameters

hdc  SafeHandle
A handle to the Device Context (DC).
hObject  SafeHandle
A handle to the object to be selected.

Return Value

IntPtr
If the selected object is not a region and the function succeeds, the return value is a handle to the object being replaced.

If the selected object is a region and the function succeeds, the return value is one of the following values.

Remarks

See Also