共用方式為


CPen Class

Encapsulates a Windows graphics device interface (GDI) pen.

class CPen : public CGdiObject

Members

Public Constructors

Name

Description

CPen::CPen

Constructs a CPen object.

Public Methods

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.

Public Operators

Name

Description

CPen::operator HPEN

Returns the Windows handle attached to the CPen object.

Remarks

For more information on using CPen, see Graphic Objects.

Inheritance Hierarchy

CObject

CGdiObject

CPen

Requirements

Header: afxwin.h

See Also

Reference

CGdiObject Class

Hierarchy Chart

CBrush Class