Solved

Retrieving desktop icon positions...

Posted on 1998-03-10
2
458 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now