CPen::GetExtLogPen

Gets an EXTLOGPEN underlying structure.

int GetExtLogPen(
   EXTLOGPEN* pLogPen 
);

Parameters

  • pLogPen
    Points to an EXTLOGPEN structure that contains information about the pen.

Return Value

Nonzero if successful; otherwise 0.

Remarks

The EXTLOGPEN structure defines the style, width, and brush attributes of a pen. For example, call GetExtLogPen to match the particular style of a pen.

See the following topics in the Windows SDK for information about pen attributes:

Example

The following code example demonstrates calling GetExtLogPen to retrieve a pen's attributes, and then create a new, cosmetic pen with the same color.

EXTLOGPEN extlogpen;
penExisting.GetExtLogPen(&extlogpen);
CPen penOther;
LOGBRUSH LogBrush = { extlogpen.elpBrushStyle, extlogpen.elpColor, 
   extlogpen.elpHatch };
penOther.CreatePen(PS_COSMETIC, 1, &LogBrush);   

Requirements

Header: afxwin.h

See Also

Concepts

CPen Class

CPen Members

Hierarchy Chart

CPen::GetLogPen

CPen::CreatePen