CPen::CPen

Use this constructor to construct a CPen object. After constructing it, you must initialize it by using either the CPen::CreatePen or CPen::CreatePenIndirect member functions, or by calling CGDI::CreateStockObject.

Syntax

CPen( );

CPen ( int nPenStyle, int nWidth, COLORREF crColor );
throw( CResourceException );

At a Glance

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

Remarks

Windows CE does not support the following overloaded version of the constructor.

CPen ( int nPenStyle, int nWidth, const LOGBRUSH* pLogBrush, int nStyleCount = 0, const DWORD* lpStyle = NULL )

In Windows CE version 1.0, only solid pens can draw wide lines.

See Also

CPen Overview, CPen Member Functions, Graphical Drawing Object Classes, CPen::CreatePen, CPen::CreatePenIndirect, CGdiObject::CreateStockObject