[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CreatePen( nStyle, nWidth, <nRGBColor )-> <hPen>
--------------------------------------------------------------------------------
PARAMETER:
<nStyle> Specifies the pen style. This parameter can be one
of the following values:
PS_SOLID [0], Creates a solid pen.
PS_DASH [1], Creates a dashed pen. (Valid only
when the pen width is 1 )
PS_DOT [2], Creates a dotted pen. (Valid only
when the pen width is 1 )
PS_DASHDOT [3], Creates a pen with alternating dashes
and dots(Valid only when the pen width is 1)
PS_DASHDOTDOT [4], Creates a pen with alternating dashes
and double dots. (Valid only when the pen
width is 1)
PS_NULL [5], Creates a null pen.
PS_INSIDEFRAME [6], Creates a pen that draws a line
inside the frame of closed shapes produced
by GDI output functions that specify a
bounding rectangle (for example Ellipse,
Rectangle, RoundRect, Pie and Chord.
When this style is used with GDI output
functions that do not specify a bounding
rectangle (for example, the LineTo function),
the drawing area of the pen is not limited
by a frame
<nWidth> Specifies the width of the pen in logical units. If
this value is zero, the width in device units is always
one pixel, regardless of the mapping mode.
<nRGBColor> Specifies the color of the pen.
RETURNS:
<hPen> is the handle of our new Pen or 0 if it was not possible to
create it.
DESCRIPTION:
This function creates a pen with the specified style, width and color.
The pen can be subsequently selected as the current pen for any device.
When it has finished using a pen created by CreatePen(), an application
should remove the pen by using the DeleteObject function.
EXAMPLE:
+-------------------------------------------------------------+
| /* Create a solid blue pen 6 units wide */ |
| hPen := CreatePen( PS_SOLID, 6, RGB( 0, 0, 255)) |
+-------------------------------------------------------------+
SOURCE:
SOURCE\WINAPI\CREATEPE.C
See Also:
TPEN
DEFINE PEN
LineTo
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson