Jump to content

z-order of desktop's icons & child window


Recommended Posts

Hi, all!

I know insert a GUI (window) inside Desktop:

#include<guiconstants.au3>
#include<WindowsConstants.au3>
#Include <WinAPI.au3>
#Include <Constants.au3>

$hbureau=WinGetHandle("[CLASS:Progman]")
$hGui1 = GUICreate("GUI Embedder",420,300,-1,-1,$WS_POPUP)
$btclose=GUICtrlCreateButton("Fermer / Close",100,125,220,50)
GUISetState(@SW_SHOW)
$origParent1 = DllCall("user32.dll", "int", "SetParent", "hwnd", $hGui1, "hwnd",$hbureau)
WinMove($hGui1, "", 80,50)
While 1
    $Msg = GUIGetMsg()    
    If ($Msg=$GUI_EVENT_CLOSE) Or ($Msg=$btclose) Then
        DllCall("user32.dll", "int", "SetParent", "hwnd", $hGui1, "hwnd", $origParent1[0])
        ExitLoop
    EndIf
    sleep(12)
WEnd
GUIDelete($hGui1)
Exit
But the GUI is over icons. Now, I would want it below icons (like background-screen/wallpaper).

I tried

_WinAPI_SetWindowPos($hGui1, $HWND_BOTTOM, 80, 50, 420, 300, $SWP_NOACTIVATE)

to change z-order, but that works with a window inside desktop.

An idea?

Edited by Michel Claveau
Link to comment
Share on other sites

Re!

Thank you.

But the word "trivial" is not synonym of "impossible".

If it is possible, we can re-create (replace) the old (XP) ActiveDesktop, which does not exist any more in Vista & Win-7, with an Autoit's script.

I think you are unlikely to be able to do that. I suspect the desktop is continually updated to ensure that the z-order is kept as required.

Maybe instead you could create your window, and copy all the icons and shortcuts on the desktop into your window.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...