Specifically I'm looking for a reliable way to retreive/set positions of
icons on the Win95 desktop.
(I bet this questions been asked a few times before)
I know that the positions are *likely* to have been saved in the registry
under
HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Strea
ms\
but these are only read/written on shutdown/bootup.
I could change the values in the registry but how would I persuade explorer
to read them back in again?
(Also how would I know which stream number corresponds the the desktop
anyway!!!)
Please tell me someone has figured all this out & point me in the right
direction.
Thank in advance.
Rob...@CyberDude.com
PS. Out of curiousity I wonder what happens if you use SetWindowLong to
mutate the style of the Desktop from being Icon view to Small Icon view.
Will try this in a bit.
>Is there any hack to get the position of icons in a ListView control (when
>in Icon mode)?
>
>Specifically I'm looking for a reliable way to retreive/set positions of
>icons on the Win95 desktop.
>(I bet this questions been asked a few times before)
>
??? The desktop isn't a list view... whatever gave you that idea?
The icons on the desktop are just chilld windows of the desktop window
- just enumerate them and you'll get the info you need.
Tony
----------------------------------------------------
"640K should be enough for anybody" -- Bill Gates
t...@netfusion.co.uk
----------------------------------------------------
Sure it is. Use a utility like Spy++ and point to the desktop, and
you'll see that the window class is SysListView32.
I have no idea how to get its handle, though.
Katy
Nah... The desktop's class is '#32769 (Desktop)' on my system.
Explorer windows are generally SysListView32, but that's because they
usually are list views.
What you get back from FindWindow aint the desktop - it has a parent
(SHELLDLL_DefView) and is a child of explorer (aka. Progman).
The fact that it's true, perhaps?
The desktop is indeed a listview in "large icon" display mode. You can
easily verify this for yourself using the "Spy++" tool supplied with
VC++, or an equivalent.
Chris
----------------------------------------------------------------
Chris Marriott, Microsoft Certified Solution Developer.
SkyMap Software, U.K. e-mail: ch...@skymap.com
Visit our web site at http://www.skymap.com
Apparently, you don't know that what you see as desktop in Win95 and NT
4
actually IS an explorer window!
So, yes, SysListView32 is where the desktop icons are.
And, you don't get the task manager when you do a right click on the
"Desktop", like you did in Win3.x and NT3.x.
Another hint: kill Explorer in the task manager, and you see all icons
(and the taskbar) vanish. In NT4, everything is reloaded, so there is no
risk.
In fact, I just wrote a program to subclass SysListView32 to change the
background bitmap, and it works fine. Since I put my DLL in the Explorer
address space, it crashed several times during development. No harm
done,
since NT4 reloads it.
Joe
>On Thu, 28 Aug 1997 08:37:39 GMT, "Robert Pitt"
><Rob...@CyberDude.com> wrote:
>
>>Is there any hack to get the position of icons in a ListView control (when
>>in Icon mode)?
>>
>>Specifically I'm looking for a reliable way to retreive/set positions of
>>icons on the Win95 desktop.
>>(I bet this questions been asked a few times before)
>>
>??? The desktop isn't a list view... whatever gave you that idea?
>
>The icons on the desktop are just chilld windows of the desktop window
>- just enumerate them and you'll get the info you need.
I'm afraid you're working with old information, like from 16-bit
Windows. Under Windows 95 and NT 4+, the desktop is in fact a standard
list-view window in large-icon mode.
Thought for the day: If you aren't pretty sure that you know what
you're talking about, it might be better to remain in "listen mode".
Steve Dirickson WestWin Consulting
(360) 598-6111 sdir...@kpt.nuwc.navy.mil
The desktop isn't a listview, its classname is "#32769".
Perhaps the "explorer" will, if running as a shell, put
some large listview over the desktop, but i'm not sure about
that.
Greetings,
Bernd
The shell desktop is a ListView. Here I am looking at Windows 95a. The relevant
part of the window tree is
"Desktop" (#32769)
|
+-- "Program Manager" (Progman)
|
+-- "" (SHELLDLL_DefView)
|
+-- "" (SysListView32)
|
+-- "" (SysHeader32)
Dektop is the global parent and has no interesting behaviour AFAIK, except that
it's where any desktop settings (pattern, wallpaper) apply.
Program Manager is there for compatibility with applications that expect a 3.x
shell, but is hidden by its children, which have the same structure as a
ListView like My Computer.
The SHELLDLL_DefView window seems to be where the icons are drawn - when it's
hidden, the desktop icons disappear.
The SysListView32 presumably is what fields the OLE stuff, drag&drop, etc. Its
window properties include things like:
00000004 = OleEndPointID
000003D4 = EndPoint_Notify_UL
FFFC0BB3 = EndPoint_Punk_TID
005404F0 = OleDropTargetInterface
Compared with a My Computer-style window, this has the style bits LVS_NOSCROLL
| LVS_ALIGNLEFT, which explains the different behaviour of the shell desktop.
Also, when you have a desktop pattern or wallpaper, hiding this window deletes
the icons - hmmmmm.
--
Dirk Fieldhouse Logica UK Limited
field...@logica.com 75 Hampstead Road
c=gb;a=attmail;p=logica; London NW1 2PL
o=lg;ou1=lgwct;s=fieldhouse UK
+44 (171) 637 9111
Hm. I don't have that "Spy++", but if i close everything except
one console and then enumerate all windows, i find:
- the background/desktop, class "#32769"
- one window belonging to the "system"-process, hidden, class "#32768",
without childs
- one window of NetDDE Agent, hidden, class "NDDEAgnt",
without childs
- one hidden window, class "tooltips_class32", without childs
- one window to display the window-list, class "SysTreeView32", no
childs
- one console-window, class "ConsoleWindowClass", no childs
There is no SysListView32 anywhere. I insist must be a feature of
"explorer", which is not my shell.
Greetings,
Bernd
BTW, Spy++ comes with Visual C++.
Greetings
Joe