Partager via


Gdi::SelectObject_I (Windows Embedded CE 6.0)

1/6/2010

This method selects an object into a specified device context. The new object replaces the previous object of the same type.

Syntax

static WINGDIAPI HGDIOBJ WINAPI SelectObject_I(
  HDC hdc,
  HGDIOBJ hgdiobj
);

Parameters

  • hdc
    [in] Handle to the device context.

Return Value

If the selected object is not a region, the handle of the object being replaced indicates success.

The following table shows the values that indicate success if the selected object is a region.

Value Description

SIMPLEREGION

Region consists of a single rectangle.

COMPLEXREGION

Region consists of more than one rectangle.

NULLREGION

Region is empty.

NULL indicates that an error occurred and the selected object is not a region. Otherwise, a GDI_ERROR value is returned.

Remarks

This method is an internal version of the SelectObject function.

This function returns the previously selected object of the specified type. An application should always replace a new object with the original default object after the application has finished drawing with the new object.

An application cannot select a bitmap into more than one device context at a time.

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
CreateDIBSection
SelectObject
Gdi::CombineRgn_I
Gdi::CreateBitmap_I
Gdi::CreateCompatibleBitmap_I
Gdi::CreateDIBPatternBrushPt_I
Gdi::CreateFontIndirectW_I
Gdi::CreatePatternBrush_I
Gdi::CreatePen_I
Gdi::CreatePenIndirect_I
Gdi::CreateRectRgn_I
Gdi::CreateRectRgnIndirect_I
Gdi::CreateSolidBrush_I
Gdi::SelectClipRgn_I