Windows Areo Problem

  • Hallo,

    ich möchte eine GUI erstellen, das die Areo-Effekte von Vista und Windows 7 nutzt. Leider ist das nicht so einfach wie es aussieht.
    Bis jetzt sieht es bei mir so aus:

    [Blockierte Grafik: http://deepsoftware.kilu.de/GUI.png]

    Problem dabei ist halt, dass das Menu falsch dargestellt wird.

    Hier mein Code:

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    ;Includes
    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <ListViewConstants.au3>
    #include <Constants.au3>
    #include <WinAPI.au3>
    #include <GUIStatusBar.au3>
    #include <Array.au3>
    #include <GUIListView.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Klassen
    #include <class\rsmgui.au3>
    #include <class\ini.au3>
    #include <class\radio station.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <include\aero.au3>

    [/autoit] [autoit][/autoit] [autoit]

    ;Optionen
    Opt("GUIOnEventMode", 1)
    OnAutoItExitRegister("_BeendeProgramm")

    [/autoit] [autoit][/autoit] [autoit]

    ;Verzeichnisse
    Global Const $ScriptDir = @ScriptDir
    Global Const $ScriptFullPath = @ScriptFullPath
    Global Const $ComponentDir = $ScriptDir & "\components"
    Global Const $AppDataDir = @AppDataDir & "\DeepSoftware\Desktop Radio"
    Global Const $Compiled = @Compiled
    Global Const $AutoItPID = @AutoItPID

    [/autoit] [autoit][/autoit] [autoit]

    ;Erstellt wichtige Objekte.
    Local $inipath = _ReadConfig("Settings", "PathToIni")
    Local $hotkey = _New_IniObject($inipath & "\Hotkeys.ini")
    Local $setting = _New_IniObject($inipath & "\Settings.ini")
    Local $data = _New_IniObject($inipath & "\Data.ini")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Objekte erzeugen
    Local $rsmgui = _New_RSMGUI()
    $rsmgui.create()
    $rsmgui.GUISetOnEvent($GUI_EVENT_CLOSE, "_BeendeProgramm")
    $rsmgui.loadSettings($data)
    $rsmgui.show(True)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Global $MyArea[4] = [0, 0, 64, 0]
    _DWM_Aero_ApplyGlassArea(HWnd($rsmgui.handle), $MyArea)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _BeendeProgramm()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GUIImageList_AddIconSize($hWnd, $sFile, $iSize=64) ;By Progandy!
    Local $hIcon = _WinAPI_LoadImage(0, $sFile, $IMAGE_ICON, $iSize, $iSize, $LR_LOADFROMFILE)
    Local $iResult = _GUIImageList_ReplaceIcon($hWnd, -1, $hIcon)
    _WinAPI_DestroyIcon($hIcon)
    Return $iResult
    EndFunc ;==>_GUIImageList_AddIcon

    [/autoit] [autoit][/autoit] [autoit]

    Func _ReadConfig($Section, $Key)
    Return Execute(IniRead($ScriptDir & "\config.ini", $Section, $Key, $AppDataDir))
    EndFunc

    [/autoit]

    und hier die Aero.au3:

    Spoiler anzeigen
    [autoit]

    Global Const $DWM_BB_ENABLE = 0x00000001
    $Struct = DllStructCreate("int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight;")
    $sStruct = DllStructCreate("dword;int;ptr;int")

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION#;===============================================================================
    ;
    ; Name...........: _DWM_Aero_ApplyGlass
    ; Description ...: Applys glass effect to a window
    ; Syntax.........: _DWM_Aero_ApplyGlass($hWnd, [$bColor)
    ; Parameters ....: $hWnd - Window handle:
    ; $bColor - Background color
    ; Return values .: Success - No return
    ; Failure - Returns 0
    ; Author ........: James Brooks
    ; Modified.......:
    ; Remarks .......: Thanks to weaponx!
    ; Related .......:
    ; Link ..........;
    ; Example .......; Yes
    ;
    ;;==========================================================================================
    Func _DWM_Aero_ApplyGlass($hWnd, $bColor = 0x000000)
    If Not _IsWinAero() Then
    SetError(0, 0, -1)
    Return 0
    Else
    GUISetBkColor($bColor); Must be here!
    $Ret = DllCall("dwmapi.dll", "long", "DwmExtendFrameIntoClientArea", "hwnd", $hWnd, "long*", DllStructGetPtr($Struct))
    If @error Then
    SetError(0)
    Return 0
    Else
    Return $Ret
    EndIf
    EndIf
    EndFunc ;==>_DWM_Aero_ApplyGlass

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION#;===============================================================================
    ;
    ; Name...........: _DWM_Aero_ApplyGlassArea
    ; Description ...: Applys glass effect to a window area
    ; Syntax.........: _DWM_Aero_ApplyGlassArea($hWnd, $Area, [$bColor)
    ; Parameters ....: $hWnd - Window handle:
    ; $Area - Array containing area points
    ; $bColor - Background color
    ; Return values .: Success - No return
    ; Failure - Returns 0
    ; Author ........: James Brooks
    ; Modified.......:
    ; Remarks .......: Thanks to monoceres!
    ; Related .......:
    ; Link ..........;
    ; Example .......; Yes
    ;
    ;;==========================================================================================
    Func _DWM_Aero_ApplyGlassArea($hWnd, $Area, $bColor = 0x000000)
    If Not _IsWinAero() Then
    SetError(0, 0, -1)
    Return 0
    Else
    If _DWM_ICE() Then
    ConsoleWrite("ICE ENABLED!" & @CRLF)
    If IsArray($Area) Then
    DllStructSetData($Struct, "cxLeftWidth", $Area[0])
    DllStructSetData($Struct, "cxRightWidth", $Area[1])
    DllStructSetData($Struct, "cyTopHeight", $Area[2])
    DllStructSetData($Struct, "cyBottomHeight", $Area[3])
    GUISetBkColor($bColor); Must be here!
    $Ret = DllCall("dwmapi.dll", "long*", "DwmExtendFrameIntoClientArea", "hwnd", $hWnd, "ptr", DllStructGetPtr($Struct))
    If @error Then
    SetError(0, 0, 1)
    Return 0
    Else
    Return $Ret
    EndIf
    Else
    ConsoleWrite("ICE DISABLED!" & @CRLF)
    SetError(1)
    Return 0
    EndIf
    Else
    SetError(2, 0, 2)
    Return 0
    EndIf
    EndIf
    EndFunc ;==>_DWM_Aero_ApplyGlassArea

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION#;===============================================================================
    ;
    ; Name...........: _DWM_Aero_EnableBlurBehind
    ; Description ...: Enables the blur effect on the provided window handle.
    ; Syntax.........: _DWM_Aero_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 _DWM_Aero_EnableBlurBehind($hWnd, $bColor = 0x000000)
    If Not _IsWinAero() Then
    SetError(0, 0, -1)
    Return 0
    Else
    DllStructSetData($sStruct, 1, $DWM_BB_ENABLE)
    DllStructSetData($sStruct, 2, "1")
    DllStructSetData($sStruct, 4, "1")

    [/autoit] [autoit][/autoit] [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION#;===============================================================================
    ;
    ; Name...........: _DWM_ICE
    ; Description ...: Returns 1 if DWM is enabled or 0 if not
    ; Syntax.........: _DWM_ICE()
    ; Parameters ....:
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: James Brooks
    ; Example .......; Yes
    ;
    ;;==========================================================================================
    Func _DWM_ICE()
    If Not _IsWinAero() Then
    $ICEStruct = DllStructCreate("int;")
    $Ret = DllCall("dwmapi.dll", "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($ICEStruct))
    If @error Then
    SetError(0, 0, -1) ; DWM is not active
    Return 0
    Else
    Return DllStructGetData($ICEStruct, 1)
    EndIf
    Else
    SetError(1, 0, 1) ; Not running Windows 6.1 or above
    Return 1
    EndIf
    EndFunc ;==>_DWM_Aero_ICE

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION#;===============================================================================
    ;
    ; Name...........: __GetVersionEx
    ; Description ...: Returns version number of OS
    ; Syntax.........: _GetVersionEx()
    ; Parameters ....:
    ; Return values .: Success - Returns version integer
    ; Failure - Returns 0
    ; Author ........: James Brooks
    ;
    ;;==========================================================================================
    Func _IsWinAero()
    Local $__iVer = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion")
    If $__iVer >= 6.1 Then
    Return 1
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit]
  • Vl. haste einfach es so eingestllt das es so durchschaut ?
    Das ist doch das was du meinst oder=

    Du kannstja einstellen wie viel durch"schimmert" und wie viel nicht :0

    Meine Projekte :

    Taschenrechner [X]
    JamLegend Auto-Player [Canceld]
    Launcher [X]
    Multi-Game-Quest-Viewer [Canceld]


    [autoit]

    If $goffy or not $brain Then $DeleteInetCable

    [/autoit]
  • Rechts klick auf den Desktop dann Anpassung dann auf Fensterfabe danach die Farbintensität umstellen :0

    Meine Projekte :

    Taschenrechner [X]
    JamLegend Auto-Player [Canceld]
    Launcher [X]
    Multi-Game-Quest-Viewer [Canceld]


    [autoit]

    If $goffy or not $brain Then $DeleteInetCable

    [/autoit]
  • Zeig mal die UDF

    Meine Projekte :

    Taschenrechner [X]
    JamLegend Auto-Player [Canceld]
    Launcher [X]
    Multi-Game-Quest-Viewer [Canceld]


    [autoit]

    If $goffy or not $brain Then $DeleteInetCable

    [/autoit]