Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets the attached Windows GDI handle of the CPen object.
operator HPEN( ) const;
Return Value
If successful, a handle to the Windows GDI object represented by the CPen object; otherwise NULL.
Remarks
This operator is a casting operator, which supports direct use of an HPEN object.
For more information about using graphic objects, see the article Graphic Objects in Windows SDK.
Example
// Create a solid red pen of width 2.
CPen myPen(PS_SOLID, 2, RGB(255,0,0));
// Get the handle of the pen object.
HPEN hPen = (HPEN) myPen;
Requirements
Header: afxwin.h