EDN Admin
Well-known member
When using a COLORKEY for transparency within a CDialog, Id like to be able to have the window not allow the user to click through. The user needs to be able to still right mouse click for menu options. Is there a way to do this?
<div style="color:Black;background-color:White; <pre>
SetWindowLong(hWnd, GWL_EXSTYLE,
GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(RGB(255, 0, 255), 0,LWA_COLORKEY);
[/code]
I have a DIALOG that is broken up into several rows of rapidly changing data... For example:
X: 10.12345
Y: 20.56789
Z: 30.46812
Id like for each row to be transparent minus the text being displayed, but still allow the user the ability to right click within a row so that they are presented with a menu allowing them to change options for the data displayed.
I was hoping for a somewhat "canned" approach like using SetLayeredWindowAttributes above. I probably could use per pixel alpha blending (UpdateLayeredWindow) so that the non-text areas have a slight alpha blending (say 1). In doing so the hope
would be to still provide left/right mouse click support.
Any other suggestions would be greatly appreciated.
Thanks in advance!
View the full article
<div style="color:Black;background-color:White; <pre>
SetWindowLong(hWnd, GWL_EXSTYLE,
GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes(RGB(255, 0, 255), 0,LWA_COLORKEY);
[/code]
I have a DIALOG that is broken up into several rows of rapidly changing data... For example:
X: 10.12345
Y: 20.56789
Z: 30.46812
Id like for each row to be transparent minus the text being displayed, but still allow the user the ability to right click within a row so that they are presented with a menu allowing them to change options for the data displayed.
I was hoping for a somewhat "canned" approach like using SetLayeredWindowAttributes above. I probably could use per pixel alpha blending (UpdateLayeredWindow) so that the non-text areas have a slight alpha blending (say 1). In doing so the hope
would be to still provide left/right mouse click support.
Any other suggestions would be greatly appreciated.
Thanks in advance!
View the full article