www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - setAlpha exception

reply kenshiro55 <kenshiro55 users.sourceforge.net> writes:
I tried to use window transparency so I have this code:

Shell shell = new Shell(DWT.SHELL_TRIM);
shell.setVisible(true);
shell.setAlpha(100);

But I have this error: object.Exception: Access Violation.

I searched the cause and it crashed at this line in Shell.setAlpha:
OS.SetLayeredWindowAttributes (handle, 0, cast(byte)alpha, OS.LWA_ALPHA);

Is it a bug or my environment ?

Tested with dmd 1.0.28, winxp sp2, tango 0.99.6 and dwt-win 2008-07-21.
Jul 24 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
kenshiro55 schrieb:
 I tried to use window transparency so I have this code:
 
 Shell shell = new Shell(DWT.SHELL_TRIM);
 shell.setVisible(true);
 shell.setAlpha(100);
 
 But I have this error: object.Exception: Access Violation.
 
 I searched the cause and it crashed at this line in Shell.setAlpha:
 OS.SetLayeredWindowAttributes (handle, 0, cast(byte)alpha, OS.LWA_ALPHA);
 
 Is it a bug or my environment ?
 
 Tested with dmd 1.0.28, winxp sp2, tango 0.99.6 and dwt-win 2008-07-21.
Fixed. Thanks for the report.
Jul 24 2008