mihaibr Posted November 24, 2012 Share Posted November 24, 2012 Hi, Is there any way to stick a GUI to the desktop? I want to make a "Custom Desktop" application that will run over the current "Windows Desktop". Any idea? Link to comment Share on other sites More sharing options...
PlayHD Posted November 24, 2012 Share Posted November 24, 2012 (edited) take a look hereAnd this is a exampleexpandcollapse popup#include $hDeskWin=_WinGetDesktopHandle() $gui = GUICreate("PHD Example") _WinAPI_SetParent($gui,$hDeskWin) GUISetState() Do Until GUIGetMsg() = -3 ; =============================================================================================================================== ; <_WinGetDesktopHandle.au3> ; ; Function to get the Windows' Desktop Handle. ; Since this is no longer a simple '[CLASS:Progman]' on Aero-enabled desktops, this method uses a slightly ; more involved method to find the correct Desktop Handle. ; ; Author: Ascend4nt, credits to Valik for pointing out the Parent->Child relationship: Desktop->'SHELLDLL_DefView' ; =============================================================================================================================== Func _WinGetDesktopHandle() Local $i,$hDeskWin,$hSHELLDLL_DefView,$hListView ; The traditional Windows Classname for the Desktop, not always so on newer O/S's $hDeskWin=WinGetHandle("[CLASS:Progman]") ; Parent->Child relationship: Desktop->SHELLDLL_DefView $hSHELLDLL_DefView=ControlGetHandle($hDeskWin,'','[CLASS:SHELLDLL_DefView; INSTANCE:1]') ; No luck with finding the Desktop and/or child? If $hDeskWin='' Or $hSHELLDLL_DefView='' Then ; Look through a list of WorkerW windows - one will be the Desktop on Windows 7+ O/S's $aWinList=WinList("[CLASS:WorkerW]") For $i=1 To $aWinList[0][0] $hSHELLDLL_DefView=ControlGetHandle($aWinList[$i][1],'','[CLASS:SHELLDLL_DefView; INSTANCE:1]') If $hSHELLDLL_DefView<>'' Then $hDeskWin=$aWinList[$i][1] ExitLoop EndIf Next EndIf ; Parent->Child relationship: Desktop->SHELDLL_DefView->SysListView32 $hListView=ControlGetHandle($hSHELLDLL_DefView,'','[CLASS:SysListView32; INSTANCE:1]') If $hListView='' Then Return SetError(-1,0,'') Return SetExtended($hListView,$hDeskWin) EndFunc Edited November 24, 2012 by PlayHD My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
mihaibr Posted November 24, 2012 Author Share Posted November 24, 2012 wow, thank you very much PlayHD Link to comment Share on other sites More sharing options...
PlayHD Posted November 25, 2012 Share Posted November 25, 2012 my pleasure and good luck on your project My UDF : _WinShake, _WinSplitMy Apps : Google Guitar Bot, PuzzleGameDesign Gui : Interesting Tabs Design, RBox Project (abandoned), Animated Gui on Exit Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now