Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Want to create an application which will create a transparent window.
Thanks for help
Posted

1 solution

There are two steps:

C++
// Set WS_EX_LAYERED on this window 
SetWindowLong(hwnd, GWL_EXSTYLE,
        GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
// Make this window 70% alpha
SetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA);


Here is only one variable hwnd - handle of a window :)

Layered windows[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900