Solved

Retrieving desktop icon positions...

Posted on 1998-03-10
2
472 Views
Last Modified: 2013-11-20
Greets all,

I'm trying to retrieve the positions of all the icons on the desktop in 95 using VC++.  
Any idea how to go about it?  

I've already tried grabbing the SysListView32 window and using the ListView_GetItemPosition
macro to attempt this, but it crashes Explorer every time I try.  The amusing/annoying thing is, I
CAN do a ListView_GetSelectedCount call using the same hwnd and get a valid answer.  Most
of the other ListView_* macros crash explorer as well, with some notable exceptions.  Is this
information in the registry somewhere?  Any hints or other possible directions to try would be
appreciated.

- Tnerb
0
Comment
Question by:tnerb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1316883
The problem stems from your assumption that the new common controls work similarly to the standard controls, they don't. The standard controls have code to copy data from one process to another. So when you send a control the WM_GETTEXT message, Windows has code to copy the text from the address space of the control into your address space. However, this code does not apply to the new common controls. So you cannot get to any of its API from another process.

That means the only way you can get to that information is if you were in the same process space of that window. This means you will have to create a DLL and insert into the process. You can do this fairly easily with a system hook. Then you will need to provide some interprocess communication with that DLL. You can subclass the desktop's window, provide a registered window message to communicate back and forth to get to the data.


0
 

Author Comment

by:tnerb
ID: 1316884
Ah.  Afraid it was something along those lines.  Thanks!  I'll
give it a shot.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question