CDC::SelectObject

This member function selects an object into the device context. Class CDC provides five versions specialized for particular kinds of GDI objects, including pens, brushes, fonts, bitmaps, and regions. The newly selected object replaces the previous object of the same type.

Syntax

CPen* SelectObject( CPen* pPen );

CBrush* SelectObject( CBrush* pBrush );

virtual CFont* SelectObject( CFont* pFont );

CBitmap* SelectObject( CBitmap* pBitmap );

int SelectObject( CRgn* pRgn );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CDC Overview, CDC Member Functions, Graphical Drawing Classes, CGdiObject::DeleteObject, CGdiObject::FromHandle, CDC::SelectClipRgn