Function Reference


Sets the current device context (DC) pen color to the specified color value

#include <WinAPIGdi.au3>
_WinAPI_SetDCPenColor ( $hDC, $iRGB )


$hDC Handle to the device context.
$iRGB The new pen color, in RGB.

Return Value

Success: The value that specifies the previous DC pen color, in RGB.
Failure: (-1).


The function returns the previous $DC_PEN color, even if the stock pen $DC_PEN is not selected in the DC;
however, this will not be used in drawing operations until the stock $DC_PEN is selected in the DC.

See Also

Search SetDCPenColor in MSDN Library.