Sign in to follow this  
Followers 0
komalo

Set Layered Window ?

5 posts in this topic

#1 ·  Posted (edited)

hi

i am using SetWindowLong Function to set the

ExStyle of a window to $WS_EX_LAYERED but the

problem that the window is not shown until i call

SetLayeredWindowAttributes Function Which

so can i set the set the ExStyle of a window to

$WS_EX_LAYERED without hiding ?

an example

$hWnd = WinGetHandle("")

_WinAPI_SetWindowLong($hWnd,$GWL_EXSTYLE,$WS_EX_LAYERED )

_WinAPI_SetLayeredWindowAttributes($hWnd, 000000, 255)

Edited by komalo

[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites



komalo

Maybe need to redraw or update the window, after style sets?

Share this post


Link to post
Share on other sites

well SetLayeredWindowAttributes refresh it

that's why i am asking becouse the window hides when ExStyle Applied

and then SetLayeredWindowAttributes show it

which makes some kind of flash


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites

just use winsettrans. this sets the layered attrib, too.

; set layered;)
WinSetTrans("","",255)

; just for checking
#include <WinAPI.au3>
#include <WindowsConstants.au3>

$long = _WinAPI_GetWindowLong($hWnd,$GWL_EXSTYLE)
MsgBox(0, "has LAYERED", BitAND($WS_EX_LAYERED,$long)=$WS_EX_LAYERED)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

thank you very much ProgAndy , it worked with your code

thank you all


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0