Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.06 KB

SetLayeredWindowAttributes.md

File metadata and controls

75 lines (52 loc) · 2.06 KB

Home

Function name : SetLayeredWindowAttributes

Group: Window - Library: user32


The SetLayeredWindowAttributes function sets the opacity and transparency color key of a layered window.


Code examples:

Creating irregularly shaped FoxPro form using transparency color key
Semi-transparent Form
Transparent Menu Class (requires VFP9)
Placing On-screen Alert on top of all windows
How to make a VFP form fading out when released (GDI+ version)
How to make a VFP form fading out when released (GDI version)
Displaying dimmed window behind VFP top-level form

Declaration:

BOOL SetLayeredWindowAttributes(
    HWND hwnd,
    COLORREF crKey,
    BYTE bAlpha,
    DWORD dwFlags
);  

FoxPro declaration:

DECLARE INTEGER SetLayeredWindowAttributes IN user32;
	INTEGER hwnd,;
	INTEGER crKey,;
	SHORT   bAlpha,;
	INTEGER dwFlags
  

Parameters:

hwnd [in] Handle to the layered window.

crKey [in] COLORREF structure that specifies the transparency color key to be used when composing the layered window.

bAlpha [in] Alpha value used to describe the opacity of the layered window.

dwFlags [in] Specifies an action to take: LWA_COLORKEY, LWA_ALPHA


Return value:

If the function succeeds, the return value is nonzero.


Comments:

A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.