Hi everybody, How can I get the desktop window handle, but not with 'GetDesktopWindow' api because it gets the whole desktop, I want just the 'SysListView32', because where there are the icons, it is that class. Thanx!:cool:
I would imagine that SysListView32 is a child of the Desktop window, so use EnumChildWindows using the Desktop Window as the parent, and find the handle from there. umbongo.
under win2k it is child of : ."" #32769 ; this is Desktop ... |_"Program Manager" Progman |_"" SHELLDLL_DefView |_"" SysListView32 you could use : .data Progman db "Progman",0 ... FindWindow, addr Progman, 0 GetWindow, eax, GW_CHILD GetWindow, eax, GW_CHILD mov hSysListview32, eax ; handle of what you want it work fine for me This message was edited by gael, on 3/12/2001 8:19:55 AM
Except the number and order of children can change from OS to OS of windows. I would assume that there is only one SysList view in the children of the desktop right? So I would enumerate all of the children to the desktop and check each ones class for "SysListView32".... I'm not sure if I remember right but I think in Win95 GetDeskTopWindow does return the handle of the SysListView32 Control... not sure though, check it out. See ya, Ben