CPen::CreatePen

This method initializes a pen with the specified style, width, and color.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

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

Remarks

Windows CE does not support the following overloaded implementation of the CPen::CreatePen method:

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