CPen::CreatePen

Call this member function to initialize a pen with the specified style, width, and color.

Syntax

BOOL CreatePen (
int
nPenStyle,
int nWidth,
COLORREF crColor
);

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 CPen::CreatePen member function.

BOOL CreatePen( 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::CreatePenIndirect, CPen::CPen, CGdiObject::DeleteObject