Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

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

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software