Gdi::CreatePenIndirect_I

This method creates a logical cosmetic pen that has the style, width, and color specified in the LOGPEN structure.

static WINGDIAPI HPEN WINAPI CreatePenIndirect_I(
  const LOGPEN* lplgpn
);

Parameters

  • lplgpn
    [in] Long pointer to the LOGPEN structure that specifies the style, width, and color of the pen.

Return Values

A handle that identifies a logical cosmetic pen indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the CreatePenIndirect function.

After an application creates a logical pen, the application can select that pen into a device context by calling the Gdi::SelectObject_I method. After an application selects a pen into a device context, the application can use the pen to draw lines and curves.

When you no longer need the pen, call the Gdi::DeleteObject_I method to delete the pen.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

CreatePenIndirect | Gdi::CreateDIBPatternBrushPt_I | Gdi::DeleteObject_I | Gdi::SelectObject_I | LOGPEN

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.