flat assembler
Message board for the users of flat assembler.

Index > Windows > simple way to make your window transparent

Author
Thread Post new topic Reply to topic
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
it is so easy to make your window a little bit transparent.

Code:
invoke  GetWindowLong,[hwnd],GWL_EXSTYLE
                or   eax,WS_EX_LAYERED
invoke  SetWindowLong,[hwnd],GWL_EXSTYLE,eax
invoke  SetLayeredWindowAttributes,[hwnd],0,150,LWA_ALPHA
    


for the third parameter for SetLayeredWindowAttributes, you could fill in the value from 0 to 255, 0 = complete trasnparent, 255 = opaque

Image


easy right Laughing
Post 07 Apr 2006, 15:22
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
supported since which windows version? this is quite important thing
Post 07 Apr 2006, 18:09
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
according to psdk,
SetLayeredWindowAttributes API requires Windows 2000 and unsupported in Windows 95/98.

no luck for win9x :p
Post 07 Apr 2006, 23:58
View user's profile Send private message Visit poster's website Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost
works for NT kernel

i've used it for some time, it's a nice feature to make the window fade in/fade out when minimizing to taskbar (atleast i think) with a loop of SetLayeredWindowAttributes

_________________
redghost.ca
Post 08 Apr 2006, 02:38
View user's profile Send private message AIM Address MSN Messenger Reply with quote
FrozenKnight



Joined: 24 Jun 2005
Posts: 128
FrozenKnight
layered windows were first introduced in win 2000
Post 11 Apr 2006, 09:47
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
vbVeryBeginner wrote:
no luck for win9x :p

Almost, I managed to make [semi] transparent windows and menus on windows 9x for my "XTB" toolbar program. The advantage here was I could choose what was transparent, I wrote this in VB6 and I'm still trying to convert it to FASM Very Happy

Image
Post 13 Apr 2006, 17:04
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav
cod3b453, can you share vb source code?
Post 14 Apr 2006, 16:52
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
Which bit are you interested in, Vasilev?
Post 15 Apr 2006, 11:43
View user's profile Send private message Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav
i'm interested in porting
Post 16 Apr 2006, 09:55
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 619
cod3b453
I would rather not share my VB source at this moment in time, until I have written the improved GUI on my FASM version.
Post 17 Apr 2006, 19:00
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.