The LOGPEN structure defines the style, width, and color of a pen, a drawing object used to draw lines and borders. The CreatePenIndirect function uses the LOGPEN structure.
typedef struct tagLOGPEN {
WORD lopnStyle;
POINT lopnWidth;
COLORREF lopnColor;
} LOGPEN;
The LOGPEN structure has the following fields:
| Field | Description | ||||||||
| lopnStyle | Specifies the pen type, which can be any one of the following values: | ||||||||
| Constant Name | Value | Result | |||||||
| PS_SOLID | 0 | ___ | |||||||
| PS_DASH | 1 | ––– | |||||||
| PS_DOT | 2 | .... | |||||||
| PS_DASHDOT | 3 | –.–. | |||||||
| PS_DASHDOTDOT | 4 | –..–.. | |||||||
| PS_NULL | 5 | ||||||||
| PS_INSIDEFRAME | 6 | ___ | |||||||
| 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 primitives except polygons and polylines; the pen is drawn with a logical (dithered) color if the pen color does not match an available RGB value. The PS_INSIDE-FRAME style is identical to PS_SOLID if the pen width is less than or equal to 1. | |||||||||
| lopnWidth | Specifies the pen width (in logical units). If the lopnWidth field is zero, the pen is one pixel wide on raster devices. | , | |||||||
| lopnColor | Specifies the pen color. | ||||||||
The y value in the POINT structure for lopnWidth is not used.
The CreatePenIndirect function in Chapter 4, “Functions Directory.”