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?
+2
A:
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.
Anurag Uniyal
2009-07-17 06:24:12
Can just the reduced opacity part be done somehow else or would you do it in the same way just for that too?
Razvi
2009-07-17 06:28:48
+1
A:
Take a look at the SetLayeredWindowAttributes Win32 function.
It can be used to set the opacity and transparency of a window.
jussij
2009-07-17 06:55:02
+1
A:
Take a look at this CodeProject article: Cool, Semi-transparent and Shaped Dialogs with Standard Controls for Windows 2000 and Above.
Cristian Adam
2009-07-17 07:04:58