The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: caseys on January 03, 2011, 03:11:55 PM

Title: semi transparent window/dialog
Post by: caseys on January 03, 2011, 03:11:55 PM
ive been loking everywhere howto make semi transparent dialog but i was unable to find. could you please be so kind and give me a small example program?

(http://img14.imageshack.us/img14/791/semitransparentwindow.jpg)

thanks
Title: Re: semi transparent window/dialog
Post by: dedndave on January 03, 2011, 03:18:35 PM
there are a few others in the examples folder, too
and - if you use the forum search tool, i am sure there are more

but - i kinda like this one by Bill....

C:\masm32\examples\bcraven\calender
Title: Re: semi transparent window/dialog
Post by: redskull on January 03, 2011, 03:18:41 PM
http://win32assembly.online.fr/files/laywin.zip

It's called a "layered window", which might help when you search
Title: Re: semi transparent window/dialog
Post by: caseys on January 03, 2011, 03:24:25 PM
thanks redskull! puff puff pass =D
Title: Re: semi transparent window/dialog
Post by: Slugsnack on January 03, 2011, 03:25:28 PM
invoke GetWindowLong, hwndDlg, GWL_EXSTYLE
or eax, WS_EX_LAYERED
invoke SetWindowLong, hwndDlg, GWL_EXSTYLE, eax
invoke SetLayeredWindowAttributes, hwndDlg, NULL, 230, LWA_ALPHA


230 is the alpha in this case value. Put that code in your WM_INITDIALOG
Title: Re: semi transparent window/dialog
Post by: dedndave on January 03, 2011, 03:27:10 PM
Quote from: caseys on January 03, 2011, 03:24:25 PM
thanks redskull! puff puff pass =D

when i was young, it was puff puff puff puff puff puff, THEN pass   :bg
Title: Re: semi transparent window/dialog
Post by: caseys on January 03, 2011, 03:33:23 PM
dedndave, you never too old =D

Slugsnack, its not working =/
Title: Re: semi transparent window/dialog
Post by: redskull on January 03, 2011, 03:35:59 PM
Quote from: dedndave on January 03, 2011, 03:27:10 PM
when i was young, it was puff puff puff puff puff puff, THEN pass   :bg

but when he was young, they were doing it in chinese opium dens.  :bg
Title: Re: semi transparent window/dialog
Post by: caseys on January 03, 2011, 03:50:42 PM
Slugsnack, on a different application it works ill try to solve this out! thanks - it didnt worked becouse of windowanimation =] now its fine! great code. thanks