Win_SetLayeredWindowAttributes

<< Click to Display Table of Contents >>

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

Win_SetLayeredWindowAttributes

 

Description

 

Sets the opacity and transparency color key of a layered window.

 

Syntax

 

n = Win_SetLayeredWindowAttributes(hWnd, crKey, bAlpha, dwFlags)

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle to the layered window.

A layered window is created by specifying %WS_EX_LAYERED when creating the window or by setting %WS_EX_LAYERED via WIN_SetWindowLong after the window has been created.

crKey

Number

No

Specifies the transparency color key to be used when composing the layered window. Use RGB function to compose requested color

All pixels painted by the window in this color will be transparent.

bAlpha

Number

No

Alpha value used to describe the opacity of the layered window.

When bAlpha is 0, the window is completely transparent.

When bAlpha is 255, the window is opaque.

dwFlags

Number

No

Specifies an action to take. This parameter can be one or more of the following values:

 

%LWA_COLORKEY

Use crKey as the transparency color.

%LWA_ALPHA

Use bAlpha to determine the opacity of the layered window.

 

 

Remarks

 

For additional info, please refer to MS documentation at: http://msdn.microsoft.com/en-us/library/ms633540(VS.85).aspx

 

Restrictions

 

See also

 

Examples