CreatePenIndirect

  HPEN CreatePenIndirect(lplgpn)    
  LPLOGPEN lplgpn;    

The CreatePenIndirect function creates a logical cosmetic-pen that has the style, width and color specified in the structure at which lplgpn points.

Parameters

lplgpn

Points to the LOGPEN data structure that specifies the pen's style, width, and color.

Return Value

The return value is a handle that identifies a logical cosmetic-pen if the function is successful. Otherwise, it is NULL.

Comments

Once an application creates a logical pen, it can select that pen into a device context by calling the SelectObject function. After a pen is selected into a device context, it can be used to draw lines and curves.

When an application no longer requires the pen, it should call the DeleteObject function and delete the pen from the device context.

See Also

CreatePen DeleteObject ExtCreatePen GetObject LOGPEN RGB SelectObject