###User Defined Function### _WinAPI_CreatePen ###Description### Creates a logical pen that has the specified style, width, and color ###Syntax### #include _WinAPI_CreatePen ( $iPenStyle, $iWidth, $iColor ) ###Parameters### @@ParamTable@@ $iPenStyle Specifies the pen style. It can be any one of the following values. $PS_SOLID (0) - The pen is solid. $PS_DASH (1) - The pen is dashed. This style is valid only when the pen width is one or less in device units. $PS_DOT (2) - The pen is dotted. This style is valid only when the pen width is one or less in device units. $PS_DASHDOT (3) - The pen has alternating dashes and dots. This style is valid only when the pen width is one or less in device units. $PS_DASHDOTDOT (4) - The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units. $PS_NULL (5) - The pen is invisible. $PS_INSIDEFRAME (6) - The 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. $PS_USERSTYLE (7) - $PS_ALTERNATE (8) - $iWidth Specifies the width of the pen, in logical units. $iColor Specifies the color of the pen (BGR) @@End@@ ###ReturnValue### @@ReturnTable@@ Success: HPEN Value that identifies a logical pen Failure: 0 @@End@@ ###Remarks### The pen can subsequently be selected into a device context and used to draw lines and curves. After an application creates a logical pen, it can select that pen into a device context by calling the _WinAPI_SelectObject() function. After a pen is selected into a device context, it can be used to draw lines and curves. If the value specified by the $iWidth parameter is zero, a line drawn with the created pen always is a single pixel wide regardless of the current transformation. If the value specified by $iWidth is greater than 1, the $iPenStyle parameter must be PS_NULL, PS_SOLID, or PS_INSIDEFRAME. When you no longer need the pen, call the DeleteObject function to delete it. ###Related### _WinAPI_DeleteObject, _WinAPI_DrawLine, _WinAPI_GetBkMode, _WinAPI_LineTo, _WinAPI_MoveTo, _WinAPI_SelectObject, _WinAPI_SetBkMode ###See Also### @@MsdnLink@@ CreatePen ###Example### @@IncludeExample@@