471,354 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Get list of clickable objects on the desktop

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

Feb 13 '06 #1
3 4631
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


"Henrik" wrote:
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

Feb 13 '06 #2
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


"Henrik" wrote:
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


Feb 13 '06 #3
"F1" is your friend:
http://msdn.microsoft.com/library/de...rpathtopic.asp

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


"Henrik" wrote:
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


"Henrik" wrote:
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


Feb 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by bob_smith_17280 | last post: by
53 posts views Thread by Kerberos | last post: by
3 posts views Thread by RCCNH | last post: by
15 posts views Thread by desktop | last post: by
3 posts views Thread by crazychrisy54 | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.