Results 1 to 1 of 1

Thread: aero frame extender

Threaded View

  1. #1
    ninjspks is offline
    VC Member
    Join Date
    Nov 2019
    Location
    uk
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sex:

    Virussafe aero frame extender

    <windows 1909 compatible
    This is a script I wrote in AutoIT3, will extend the reflection image from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Dwm\

    REG_SZ CustomThemeReflection

    I hope it may be of some use to any of you...

    * issue where it's extending into some unwanted areas like drag and drop images. * Will look at later.

    https://www.deviantart.com/mattybw0y



    Code:
    #cs ----------------------------------------------------------------------------
        AutoIt Version: 3.3.14.5
            Author: sPksNinj
                Script Function:
                    Date: 21.03.2021
    #ce ----------------------------------------------------------------------------
    
    ; Script Start
    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Process.au3>
    #include <Misc.au3>
    Global $hDLL, $hWinEventProc, $hHook
    Global $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
    Global $sStruct = DllStructCreate("dword;int;ptr;int")
    
    $hDLL = DllOpen("User32.dll")
    $hWinEventProc = DllCallbackRegister("_WinEventProc", "none", "hwnd;int;hwnd;long;long;int;int")
    If Not @error Then
        OnAutoItExitRegister("OnAutoItExit")
    Else
        MsgBox(16 + 262144, "Error", "DllCallbackRegister(_WinEventProc) did not succeed.")
        Exit
    EndIf
    
    $hHook = _SetWinEventHook($hDLL)
    If @error Then
        MsgBox(16 + 262144, "Error", "_SetWinEventHook() did not succeed.")
        Exit
    EndIf
    
    While 1
        Sleep(10)
    WEnd
    
    Func _WinEventProc($hHook, $iEvent, $hWnd, $idObject, $idChild, $iEventThread, $iEventTime)
        Local $PID = WinGetProcess($hWnd), $sEventProcName = _ProcessGetName($PID)
            if($iEvent = 0x8000) Then 
                    _DwmEnableBlurBehindWindow($hWnd)
            EndIf
    EndFunc   ;==>_WinEventProc
    
    Func _DwmEnableBlurBehindWindow($hWnd)
             Const $DWM_BB_ENABLE = 0x00000001
             DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
             DllStructSetData($sStruct, 2, "1")
             DllStructSetData($sStruct, 4, "1")
             GUISetBkColor(0x000000); Must be here!
             $Ret = DllCall(    "dwmapi.dll", "int", "DwmEnableBlurBehindWindow", "hwnd", $hWnd, "ptr", DllStructGetPtr($sStruct))
             If @error Then
                 Return 0
             Else
                 Return $Ret
             EndIf
     EndFunc ;==>_DwmEnableBlurBehindWindow
    
    Func _SetWinEventHook($hDLLUser32)
        Local $aRet
        Local Const $ACUNT = 0x8000
        Local Const $WINEVENT_OUTOFCONTEXT = 0x0
        Local Const $WINEVENT_SKIPOWNPROCESS = 0x2
        If Not $hDLLUser32 Or $hDLLUser32 = -1 Then $hDLLUser32 = "User32.dll"
        $aRet = DllCall($hDLLUser32, "hwnd", "SetWinEventHook", _
                "uint", $ACUNT , _
                "uint", $ACUNT , _
                "hwnd", 0, _
                "ptr", DllCallbackGetPtr($hWinEventProc), _
                "int", 0, _
                "int", 0, _
                "uint", BitOR($WINEVENT_OUTOFCONTEXT, $WINEVENT_SKIPOWNPROCESS))
        If @error Then Return SetError(@error, 0, 0)
        Return $aRet[0]
    EndFunc   ;==>_SetWinEventHook
    
    Func OnAutoItExit()
        If $hWinEventProc Then
            Beep(3000, 5)
            DllCallbackFree($hWinEventProc)
        EndIf
        If $hHook Then DllCall("User32.dll", "int", "UnhookWinEvent", "hwnd", $hHook)
        If $hDLL Then DllClose($hDLL)
    EndFunc   ;==>OnAutoItExit
    Attached Images  


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Right Click Extender
    By wolfman.jam in forum Applications
    Replies: 5
    Last Post: June 4th, 2023, 05:39 AM
  2. Picture Frame Logon and User Frame
    By IcicleThief69 in forum Log On Screens
    Replies: 3
    Last Post: August 27th, 2013, 06:24 PM
  3. Win7 Control Panel Extender (CP-X)
    By Generator2013 in forum Miscellaneous
    Replies: 10
    Last Post: May 17th, 2010, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •