Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 00:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Function _Vista_EnableBlurBehind

Discussion on Function _Vista_EnableBlurBehind within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
Function _Vista_EnableBlurBehind

Also.

Ich habe vor mal eine coole gui für meinen nächsten trainer zu machen.

Dann bin ich darauf gestoßen.

Ich kann es nicht so gut erklären, hier mal der script:

Code:
#include <GUIConstants.au3>

 $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
 $sStruct = DllStructCreate("dword;int;ptr;int")

 Global $MyArea[4] = [50, 50, 50, 50]

 $GUI = GUICreate("Trainer by FreehuntX", 555, 179, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Test", 8, 8, 17, 17)
 GUISetState()

 _Vista_EnableBlurBehind($GUI)
 While 1
     $iMsg = GUIGetMsg()
     Switch $iMsg
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

; #FUNCTION#;===============================================================================
;
; Name...........: _Vista_EnableBlurBehind
; Description ...: Enables the blur effect on the provided window handle.
; Syntax.........: _Vista_EnableBlurBehind($hWnd)
; Parameters ....: $hWnd - Window handle:
; Return values .: Success - No return
;                 Failure - Returns 0
; Author ........: James Brooks
; Modified.......:
; Remarks .......: Thanks to komalo
; Related .......:
; Link ..........;
; Example .......; Yes
;
;;==========================================================================================
 Func _Vista_EnableBlurBehind($hWnd, $bColor = 0x000000)
         Const $DWM_BB_ENABLE = 0x00000001

         DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
         DllStructSetData($sStruct, 2, "1")
         DllStructSetData($sStruct, 4, "1")

         GUISetBkColor($bColor); Must be here!
         $Ret = DllCall("dwmapi.dll", "int", "DwmEnableBlurBehindWindow", "hwnd", $hWnd, "ptr", DllStructGetPtr($sStruct))
         If @error Then
             Return 0
         Else
             Return $Ret
         EndIf
 EndFunc

Leute die vista haben, sollten den effekt sehen.

Nun mein Problem ist aber dass man die beschriftung der checkbox nicht sehen kann.

Auch ein Label ist nicht sichtbar.

Ist es möglich dass man die schrift eindeutig sieht? also pechschwarz?

danke im vorraus
freehuntx is offline  
Old 09/29/2010, 08:40   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
bei der checkbox haste ein gann dummen fehler gemacht ( der zeigt den text nicht an weil ein zu kurzes text feld vorhanden ist),

erhöh doch mal die zahl die in rot makiert ist:


Code:
$Checkbox1 = GUICtrlCreateCheckbox("Test", 8, 8, [COLOR="Red"]17[/COLOR], 17)
und setz ma darunter ne farbe :
Code:
GUICtrlSetColor(-1, 0x800080)
so:

Code:
[COLOR="Olive"]$Checkbox1 = GUICtrlCreateCheckbox("Test", 8, 8, 100, 17)
GUICtrlSetColor(-1, 0x800080)[/COLOR]

Wo ist da ein Label?

wenn dun label brauchst hier:


PHP Code:
$Label1 GUICtrlCreateLabel("test label"4481524617)
GUICtrlSetColor(-10x800080
Das gesammte script:

Code:
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
 $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
 $sStruct = DllStructCreate("dword;int;ptr;int")

 Global $MyArea[4] = [50, 50, 50, 50]

 $GUI = GUICreate("Trainer by FreehuntX", 555, 179, 192, 124)
[COLOR="Lime"]$Checkbox1 = GUICtrlCreateCheckbox("Test", 8, 8, 100, 17)
GUICtrlSetColor(-1, 0x800080)
$Label1 = GUICtrlCreateLabel("test label", 448, 152, 46, 17)
GUICtrlSetColor(-1, 0x800080)[/COLOR]
GUISetState()

 _Vista_EnableBlurBehind($GUI)
 While 1
     $iMsg = GUIGetMsg()
     Switch $iMsg
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

; #FUNCTION#;===============================================================================
;
; Name...........: _Vista_EnableBlurBehind
; Description ...: Enables the blur effect on the provided window handle.
; Syntax.........: _Vista_EnableBlurBehind($hWnd)
; Parameters ....: $hWnd - Window handle:
; Return values .: Success - No return
;                 Failure - Returns 0
; Author ........: James Brooks
; Modified.......:
; Remarks .......: Thanks to komalo
; Related .......:
; Link ..........;
; Example .......; Yes
;
;;==========================================================================================
 Func _Vista_EnableBlurBehind($hWnd, $bColor = 0x000000)
         Const $DWM_BB_ENABLE = 0x00000001

         DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
         DllStructSetData($sStruct, 2, "1")
         DllStructSetData($sStruct, 4, "1")

         GUISetBkColor($bColor); Must be here!
         $Ret = DllCall("dwmapi.dll", "int", "DwmEnableBlurBehindWindow", "hwnd", $hWnd, "ptr", DllStructGetPtr($sStruct))
         If @error Then
             Return 0
         Else
             Return $Ret
         EndIf
	 EndFunc
maxi39 is offline  
Old 09/29/2010, 18:29   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
naja danke aber man sieht nur die checkbox ohne schrift, und das label in rosa farbe :/
freehuntx is offline  
Old 09/29/2010, 19:09   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 53
Received Thanks: 20
_WinAPI_SetLayeredWindowAttributes does the magic:

Code:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

$Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")

$GUI = GUICreate("Trainer by FreehuntX", 555, 179, 192, 124)
GUISetState(@SW_SHOW, $GUI)
_Vista_EnableBlurBehind($GUI)

$hDummy = GUICreate("", 555, 179, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $GUI) ; Layered Child GUI erstellen
GUISetBkColor(0xABCDEF) ; GUI einfärben
_WinAPI_SetLayeredWindowAttributes($hDummy, 0xABCDEF,255) ; LayeredWindowAttributes

$Checkbox1 = GUICtrlCreateCheckbox("Test", 8, 8, 200, 20)
$Checkbox1 = GUICtrlCreateLabel("Ich teste noch mehr", 20, 50, 200, 20)
GUISetState(@SW_SHOW, $hDummy)


While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

; #FUNCTION#;===============================================================================
;
; Name...........: _Vista_EnableBlurBehind
; Description ...: Enables the blur effect on the provided window handle.
; Syntax.........: _Vista_EnableBlurBehind($hWnd)
; Parameters ....: $hWnd - Window handle:
; Return values .: Success - No return
;                 Failure - Returns 0
; Author ........: James Brooks
; Modified.......:
; Remarks .......: Thanks to komalo
; Related .......:
; Link ..........;
; Example .......; Yes
;
;;==========================================================================================
Func _Vista_EnableBlurBehind($hWnd, $bColor = 0x000000)
    Const $DWM_BB_ENABLE = 0x00000001
    $sStruct = DllStructCreate("dword;int;ptr;int")
    DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
    DllStructSetData($sStruct, 2, "1")
    DllStructSetData($sStruct, 4, "1")

    GUISetBkColor($bColor); Must be here!
    $Ret = DllCall("dwmapi.dll", "int", "DwmEnableBlurBehindWindow", "hwnd", $hWnd, "ptr", DllStructGetPtr($sStruct))
    $sStruct = 0

    If @error Then
        Return 0
    Else
        Return $Ret
    EndIf
EndFunc   ;==>_Vista_EnableBlurBehind
Shkal is offline  
Thanks
1 User
Old 09/29/2010, 19:25   #5
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
Thank u very much

Edit:

And how can i do if the user have xp or Win7 that he see a normal gui without this effect?
freehuntx is offline  
Old 09/29/2010, 19:45   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 53
Received Thanks: 20
Also bei Windows 7 funktioniert das ohne Probleme, allerdings muss (genau wie bei Vista) Aero aktiviert sein. Du kannst das @OSVersion Macro nutzen, um zwischen Betriebssystemen zu unterscheiden:


LG
Shkal is offline  
Thanks
1 User
Old 09/29/2010, 20:05   #7
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
Wo ist denn da der unterschied? bei den sources?

naja ich mach mal anstatt errormeldung einfach ne andere gui
freehuntx is offline  
Old 09/29/2010, 20:29   #8
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by freehuntx View Post
naja danke aber man sieht nur die checkbox ohne schrift, und das label in rosa farbe :/
komisch, ich bin vista 32bit user und bei mir wird alles perfekt angezeigt
maxi39 is offline  
Old 09/29/2010, 20:34   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 53
Received Thanks: 20
Quote:
Originally Posted by freehuntx View Post
Wo ist denn da der unterschied? bei den sources?
Um genau zu sein, habe ich nur diese Abfrage eingefügt:
Code:
If @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_7" Then
...
EndIf
Wenn also Win7 oder Vista benutzt werden, wird das Layered Fenster usw. erzeugt. andernfalls eben nicht, und es spielt sich alles auf dem "normalen" GUI ab.
Shkal is offline  
Thanks
1 User
Old 09/29/2010, 21:53   #10
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,622
Received Thanks: 2,070
Quote:
Originally Posted by Shkal View Post
Um genau zu sein, habe ich nur diese Abfrage eingefügt:
Code:
If @OSVersion = "WIN_VISTA" Or @OSVersion = "WIN_7" Then
...
EndIf
Wenn also Win7 oder Vista benutzt werden, wird das Layered Fenster usw. erzeugt. andernfalls eben nicht, und es spielt sich alles auf dem "normalen" GUI ab.
oops garnicht gesehen werde es mal testen
freehuntx is offline  
Old 09/29/2010, 21:54   #11
 
elite*gold: 0
Join Date: May 2010
Posts: 21
Received Thanks: 6
Jo könnte ggf. helfen ^^
Lohde is offline  
Old 09/30/2010, 13:50   #12
 
PenGuin :O's Avatar
 
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
Bei mir (Win7 64bit) verschwindet der Aero Effekt beim Verschieben des Fensters und wenn ich wieder in das Fenste nach dem Verschieben hineinklicke, ist alles wieder normal.

Ach und diese Funktion könnte auch ganz nützlich sein:

Code:
 Func _Vista_ApplyGlass($hWnd, $bColor = 0x000000)
	 Local  $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
         GUISetBkColor($bColor)
         $Ret = DllCall("dwmapi.dll", "long", "DwmExtendFrameIntoClientArea", "hwnd", $hWnd, "long*", DllStructGetPtr($Struct))
         If @error Then
             Return 0
             SetError(1)
         Else
             Return $Ret
         EndIf
 EndFunc ;==>_Vista_ApplyGlass
PenGuin :O is offline  
Reply


Similar Threads Similar Threads
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack
[HELP] Function
08/02/2010 - EO PServer Hosting - 2 Replies
Where can I find this function "gamecard> = 1" within my
Need help with ecx function
07/05/2008 - General Coding - 2 Replies
Ich hab da ein Problem ich habe eine SpeicherAdresse (007B4750) und in ihr ist wohl eine function mit folgender struct (X,Y,Z :Integer) : Integer so... wie kann ich nun diese func mir zu nutze machen und sie so zu sagen aktivieren? Ich habe folgendes versucht. ========================================== var Processhandle: THandle; WindowHandle, Pidi,
Autoit function
03/17/2008 - Silkroad Online - 0 Replies
I'm just looking to write a quick autoit script so I can auto-ress if I need to delvl someone. It's my first time using autoit ^^ I found the Sleep (#) code to wait, but what is the code to select a skill? I also would like to know how I can make the program loop until I press a button to end it. I've looked around and used the search button, but I don't see any codes posted here, only the programs. Thx for anyone who can help me :D
SV dc function when you meet some name
02/06/2007 - Conquer Online 2 - 8 Replies
my SV dc function when you meet some1 name didn't work. is any1 SV is work for this function



All times are GMT +1. The time now is 00:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.