Solved

Retrieving desktop icon positions...

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ORA-01403: no data found 43 111
tripleUp challenge 7 92
Capture logon name 13 101
Problem to App 4 116
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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 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