Get list of clickable objects on the desktop

  • Thread starter Thread starter Henrik
  • Start date Start date
H

Henrik

I need to get a list of clickable objects on the desktop and their
positions.
I have written a small program in C# and by using the Win32 function:
WindowFromPoint -function I get a handle to the desktop but now I'm
stuck.

For those who need to see the code -look below
IntPtr hWnd = Win32.WindowFromPoint(Cursor.Position);

With the handle I can get alot of cool information such as: Caption,
Class and Rect but that's not what I need...!

Now what?

Regards Henrik
 
Henrik,
Its not entirely clear what you need to get from the Desktop items. Have you
tried simply iterating through the shortcuts in the SpecialFolders Desktop
folder? The lines in each shortcut file tell a lot about what and where.
Peter
 
Thanks for the quick reply.
What I'm looking for is the place Windows registers shortcuts and
buttons that's why I think I need the handle. If Windows knows that
the object under the mouse is clickable I want to know if the object is
clickable as well. That's why I want a list or so with all available
information of the specific window.

For a start the shortcuts on the Desktop is ok. Could you please give
an example of using the SpecialFolder function? -The documentation of
the function isn't really good...


Peter Bromberg [C# MVP] skrev:
 
"F1" is your friend
http://msdn.microsoft.com/library/d...fsystemenvironmentclassgetfolderpathtopic.asp

Cheers,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




Henrik said:
Thanks for the quick reply.
What I'm looking for is the place Windows registers shortcuts and
buttons that's why I think I need the handle. If Windows knows that
the object under the mouse is clickable I want to know if the object is
clickable as well. That's why I want a list or so with all available
information of the specific window.

For a start the shortcuts on the Desktop is ok. Could you please give
an example of using the SpecialFolder function? -The documentation of
the function isn't really good...


Peter Bromberg [C# MVP] skrev:
Henrik,
Its not entirely clear what you need to get from the Desktop items. Have you
tried simply iterating through the shortcuts in the SpecialFolders Desktop
folder? The lines in each shortcut file tell a lot about what and where.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top