<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > Windows API > Win_CreatePen |
Description
Creates a logical pen that has the specified style, width, and color. The pen can subsequently be selected into a device context and used to draw lines and curves.
Syntax
n = Win_CreatePen(penStyle, penWidth, penColor)
Returns
Number; if the function succeeds, the return value is a handle that identifies a logical pen. Otherwise zero.
Parameters
Name |
Type |
Optional |
Meaning |
penStyle |
Number |
No |
0 for solid 1 for dash 2 for dot 3 for dash dot 4 for dash dot dot 5 for "invisible" pen
6 has special meaning: 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. |
penWidth |
Number |
No |
The width of the pen, in logical units. If nWidth is zero, the pen is a single pixel wide, regardless of the current transformation. |
penColor |
Number |
No |
RGB value |
Remarks
For additional info, please refer to MS documentation at: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createpen
Restrictions
See also
Examples