Method SelectObject
SelectObject(nint, nint)
Selects an object into the specified device context, replacing the previous object.
public static extern nint SelectObject(nint hdc, nint hgdiobj)
Parameters
hdcnintA handle to the device context.
hgdiobjnintA handle to the GDI object to be selected into the device context. This can be a pen, brush, font, bitmap, or other GDI object.
Returns
Remarks
This method is a wrapper for the GDI SelectObject function. The caller is
responsible for ensuring that the selected object is compatible with the device context.
The previous
object returned by this method should be restored to the device context before releasing
it to avoid
resource leaks.