CPen Class

Encapsulates a Windows graphics device interface (GDI) pen.

class CPen : public CGdiObject

Name

Description

CPen::CPen

Constructs a CPen object.

Name

Description

CPen::CreatePen

Creates a logical cosmetic or geometric pen with the specified style, width, and brush attributes, and attaches it to the CPen object.

CPen::CreatePenIndirect

Creates a pen with the style, width, and color given in a LOGPEN structure, and attaches it to the CPen object.

CPen::FromHandle

Returns a pointer to a CPen object when given a Windows HPEN.

CPen::GetExtLogPen

Gets an EXTLOGPEN underlying structure.

CPen::GetLogPen

Gets a LOGPEN underlying structure.

Name

Description

CPen::operator HPEN

Returns the Windows handle attached to the CPen object.

For more information on using CPen, see Graphic Objects.

Header: afxwin.h

Show: