Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retrieving desktop icon positions...

Posted on 1998-03-10
2
Medium Priority
?
474 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 400 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

660 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