Reputation: 2818
How can I make for example only a rectangle inside the window have opacity like 50% or something like that and for that part to have the effect of WS_EX_TRANSPARENT so that mouse clicks will go through it?
Upvotes: 4
Views: 2682
Reputation: 4834
Take a look at this CodeProject article: Cool, Semi-transparent and Shaped Dialogs with Standard Controls for Windows 2000 and Above.
Upvotes: 1
Reputation: 10580
Take a look at the SetLayeredWindowAttributes Win32 function.
It can be used to set the opacity and transparency of a window.
Upvotes: 2
Reputation: 88847
I do not think it is possible simply by setting WS_EX_TRANSPARENT, but it can be accomplished using two windows, create a window with a hole, using SetWindowRgn, and inside that hole put another transparent window using WS_EX_LAYERED and WS_EX_TRANSPARENT styles.
Upvotes: 4