###User Defined Function###
_WinAPI_ExtCreatePen

###Description###
Creates a logical cosmetic or geometric pen that has the specified style, width, and brush attributes.

###Syntax###
#include <WinAPIGdi.au3>
_WinAPI_ExtCreatePen ( $iPenStyle, $iWidth, $iBrushStyle, $iRGB [, $iHatch = 0 [, $aUserStyle = 0 [, $iStart = 0 [, $iEnd = -1]]]] )


###Parameters###
@@ParamTable@@
$iPenStyle
	A combination of type, style, end cap, and join attributes.
	The values from each category are combined by using the bitwise operation.
	The pen type can be one of the following values.
		$PS_GEOMETRIC
		$PS_COSMETIC
	The pen style can be one of the following values.
		$PS_SOLID
		$PS_DASH
		$PS_DOT
		$PS_DASHDOT
		$PS_DASHDOTDOT
		$PS_NULL
		$PS_INSIDEFRAME
		$PS_USERSTYLE
		$PS_ALTERNATE
	The end cap is only specified for geometric pens and can be one of the following values.
		$PS_ENDCAP_ROUND
		$PS_ENDCAP_SQUARE
		$PS_ENDCAP_FLAT
	The join is only specified for geometric pens and can be one of the following values.
		$PS_JOIN_BEVEL
		$PS_JOIN_MITER
		$PS_JOIN_ROUND
$iWidth
	The width of the pen.
	If $PS_GEOMETRIC type is specified, the width is given in logical units, otherwise, the width must be set to 1.
$iBrushStyle
	A brush style. This parameter can be one of the $BS_* constants.
$iRGB
	The color of a pen, in RGB.
$iHatch
	[optional] A hatch style. For more information, see <a href="_WinAPI_CreateBrushIndirect.htm">_WinAPI_CreateBrushIndirect()</a>.
$aUserStyle
	[optional] The array (dash1, space1, dash2, space2, ... dashN, spaceN) that contains the length of the dashes and spaces in a user-defined style. The first value specifies the length of the first dash, the second value specifies the length of the first space, and so on.
	This parameter is ignored if $PS_USERSTYLE style is not specified. The style count is limited to 16.
$iStart
	[optional] The index of array to start filling at.
$iEnd
	[optional] The index of array to stop filling at.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	Handle to the logical pen.
Failure 	0.
@@End@@


###Remarks###
After an application creates a pen by calling <a href="_WinAPI_ExtCreatePen.htm">_WinAPI_ExtCreatePen()</a>, it can select it into any device context by calling the <a href="_WinAPI_SelectObject.htm">_WinAPI_SelectObject()</a> function.
When an application no longer requires a specified pen, it should call the <a href="_WinAPI_DeleteObject.htm">_WinAPI_DeleteObject()</a> function to delete the pen.


###Related###
_WinAPI_SelectObject, _WinAPI_DeleteObject


###See Also###
@@MsdnLink@@ ExtCreatePen


###Example###
@@IncludeExample@@
