共用方式為


LOGPEN

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This 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; 

Members

  • lopnStyle
    Specifies the pen style, which is one of the following values.

    Value Description

    PS_SOLID

    Pen is solid.

    PS_DASH

    Pen is dashed.

    PS_DOT

    Pen is dotted.

    PS_DASHDOT

    Pen has alternating dashes and dots.

    PS_DASHDOTDOT

    Pen has dashes and double dots.

    PS_NULL

    Pen is invisible.

    PS_INSIDEFRAME

    Pen is solid.

    When this pen is used in any graphics device interface (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
    Specifies 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 ymember in the POINT structure for lopnWidth is not used.

  • lopnColor
    Specifies the pen color.

Remarks

Windows Embedded CE does not support the following values for the lopnStyle member:

  • PS_DOT
  • PS_DASHDOT
  • PS_DASHDOTDOT
  • PS_INSIDEFRAME

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

Header windows.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

CreatePenIndirect
POINT
RGB
GDI Structures