j'ai fait le programme suivant qui est assez amusant

le but de ce prog est de pouvoir lancer un icône du bureau par l'intermédiaire d'un trou réalisé dans les application afin de voir le bureau
Code : Tout sélectionner
; taille de la zone de l'écran utilisable (sans la barre des taches)
SystemParametersInfo_(#SPI_GETWORKAREA, 0, @Taille_Ecran.RECT, 0)
Largeur_Ecran = Taille_Ecran\Right - Taille_Ecran\Left
Hauteur_Ecran = Taille_Ecran\Bottom - Taille_Ecran\Top
#Taille = 175
NewList hWndList.l()
If OpenWindow(0, Taille_Ecran\Left, Taille_Ecran\Top, Largeur_Ecran, Hauteur_Ecran, #PB_Window_Invisible | #PB_Window_BorderLess, "Affiche bureau")
DC = GetDC_(0)
CreateImage(0, Largeur_Ecran, Hauteur_Ecran)
bitblt_(StartDrawing(ImageOutput()), 0, 0, Largeur_Ecran, Hauteur_Ecran, DC, 0, 0, #SRCCOPY)
StopDrawing()
ReleaseDC_(0, DC)
SetWindowLong_(WindowID(), #GWL_EXSTYLE, GetWindowLong_(WindowID(), #GWL_EXSTYLE) | #WS_EX_TOOLWINDOW) ; choix de la barre d'outil réduite
ShowWindow_(WindowID(), #SW_SHOW) ; montre la fenêtre
SetWindowPos_(WindowID(), -1, 0, 0, 0, 0, #SWP_NOSIZE | #SWP_NOMOVE)
If CreateGadgetList(WindowID())
ImageGadget(0, 0, 0, Largeur_Ecran, Hauteur_Ecran, UseImage(0))
EndIf
UpdateWindow_(WindowID())
; On pousse les fenêtres
hWnd.l = FindWindow_(0, 0)
While hWnd <> 0
If GetwindowLong_(Hwnd, #GWL_STYLE) & #WS_VISIBLE = #WS_VISIBLE
If GetwindowLong_(Hwnd, #GWL_EXSTYLE) & #WS_EX_TOOLWINDOW <> #WS_EX_TOOLWINDOW
GetWindowRect_(Hwnd, @Fen.RECT)
MoveWindow_(Hwnd, Fen\Left + Largeur_Ecran + 50, Fen\Top, Fen\Right - Fen\Left, Fen\Bottom - Fen\Top, #True)
AddElement(hWndList())
hWndList() = Hwnd
EndIf
EndIf
hWnd = GetWindow_(hWnd, #GW_HWNDNEXT)
Wend
Timer = SetTimer_(WindowID(), 0, 15, 0)
#HotKeyID = 45
RegisterHotKey_(WindowID(0), #HotKeyID, 0, #PB_Shortcut_Escape)
Repeat
Event = WaitWindowEvent()
Win = GetForeGroundWindow_()
If Event = #WM_Timer
; position de la souris
GetCursorPos_(CursorPos.POINT)
Region1 = CreateRectRgn_(Taille_Ecran\Left, Taille_Ecran\Top, Taille_Ecran\Right, Taille_Ecran\Bottom)
Region2 = CreateEllipticRgn_(CursorPos\x - #Taille, CursorPos\y - #Taille, CursorPos\x + #Taille, CursorPos\y + #Taille)
CombineRgn_(Region1, Region1, Region2, #RGN_DIFF)
SetWindowRgn_(WindowID(), Region1, #True)
DeleteObject_(Region1)
DeleteObject_(Region2)
EndIf
If Event = #WM_HOTKEY
If EventwParam() = #HotKeyID
Win = 0
EndIf
EndIf
Until Win <> WindowID()
UnregisterHotKey_(WindowID(), #HotKeyID)
KillTimer_(WindowID(), Timer)
; On remet les fenêtres
ResetList(hWndList())
While NextElement(hWndList())
GetWindowRect_(hWndList(), @Fen.RECT)
MoveWindow_(hWndList(), Fen\Left - Largeur_Ecran - 50, Fen\Top, Fen\Right - Fen\Left, Fen\Bottom - Fen\Top, #True)
Wend
EndIf
mais je n'arrive pas à obtenir le handle du bureau pour que mon programme ne se ferme pas quand je clique sur le bureau ou sur un icone du bureau
j'ai essayé avec GetDeskTopWindow_() mais ça ne me renvoi pas le handle du bureau
