Navigation:  ThinBASIC Modules > UI (User Interface) > Windows API >

Win_SetLayeredWindowAttributes

Previous pageReturn to chapter overviewNext page

 

Description

 

The SetPixel function sets the pixel at the specified coordinates to the specified color.

 

Syntax

 

n = Win_SetPixel(hDC, X, Y, lColor)

 

Returns

 

If the function succeeds, the return value is the RGB value that the function sets the pixel to. This value may differ from the color specified by crColor; that occurs when an exact match for the specified color cannot be found.

If the function fails, the return value is -1.

This can be the following value.
 

Parameters

 

Name

Type

Optional

Meaning

hDC

Number

No

A handle to the device context.

X

Number

No

The x-coordinate, in logical units, of the point to be set.

Y

Number

No

The y-coordinate, in logical units, of the point to be set.

lColor

Number

No

The color to be used to paint the point

 

Remarks

 

For additional info, please refer to MS documentation at: http://msdn.microsoft.com/en-us/library/windows/desktop/dd145078(v=vs.85).aspx

 

Restrictions

 

See also

 

Examples