LOGPEN structure

The LOGPEN structure defines the style, width, and color of a pen. The CreatePenIndirect function uses the LOGPEN structure.

Syntax


typedef struct tagLOGPEN {
  UINT     lopnStyle;
  POINT    lopnWidth;
  COLORREF lopnColor;
} LOGPEN, *PLOGPEN;

Members

lopnStyle

The pen style, which can be one of the following values.

ValueMeaning
PS_SOLIDThe pen is solid.
PS_DASHThe pen is dashed.
PS_DOTThe pen is dotted.
PS_DASHDOTThe pen has alternating dashes and dots.
PS_DASHDOTDOTThe pen has dashes and double dots.
PS_NULLThe pen is invisible.
PS_INSIDEFRAMEThe pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens.

 

lopnWidth

The POINT structure that contains the pen width, in logical units. If the pointer member is NULL, the pen is one pixel wide on raster devices. The y member in the POINT structure for lopnWidth is not used.

lopnColor

The pen color. To generate a COLORREF structure, use the RGB macro.

Remarks

If the width of the pen is greater than 1 and the pen style is PS_INSIDEFRAME, the line is drawn inside the frame of all GDI objects except polygons and polylines. If the pen color does not match an available RGB value, the pen is drawn with a logical (dithered) color. If the pen width is less than or equal to 1, the PS_INSIDEFRAME style is identical to the PS_SOLID style.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Pens Overview
Pen Structures
COLORREF
CreatePenIndirect
POINT
RGB

 

 

Show: