CPen::GetExtLogPen

int GetExtLogPen( EXTLOGPEN* pLogPen );

Return Value

Nonzero if successful; otherwise 0.

Parameters

pLogPen

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

Remarks

Call this member function to get an EXTLOGPEN underlying structure. 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 Win 32 SDK Programmer’s Reference 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 );

CPen OverviewClass MembersHierarchy Chart

See Also   CPen::GetLogPen, CPen::CreatePen