Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi and Windows Desktop Icons

Status
Not open for further replies.

flubbo

Programmer
Oct 1, 2002
3
US
To whom it may concern:

Thank you in advance for taking the time to read this post. For months now,
I have been searching through Microsoft's documentation and combing the web
for answers to this simple question, to no avail. This quest has made
me realize the vastness of the Windows Programming Environment.

I'll begin with a brief statement to help you understand
what part of the Windows GUI I am talking about.

The GUI portion of a Windows Desktop Shortcut has an Icon and a Title. If you place the Mouse Pointer over the Title Text and press-and-hold the left mouse button for a second and release it, You place the Icon Title in an Editing Mode. You can then edit the Title text. When you change focus, or press Enter on the Keyboard, the Icon Title switches out of Editing mode and returns to it's previous state.

My question has two parts:

1) What Windows mechanism controls this Editor mode?
Can the programmer sense the state of the Desktop Icon and respond accordingly (or save the state and restore it,as in the case of Clipboard managers that do not correctly handle pasting names into Icon Titles).

2) How can this Windows Mechanism be accessed in Delphi?
Shell Objects? Active X? I don't have a clue.

Thanks in advance, and Best Wishes to All,

-Flubbo
 
As far as creating and editing shortcuts, you can use either native windows API calls, or through the Windows Scripting Host as an ActiveX object.

But as for toggling the edit state of a Desktop Icon's name, I'm not sure how you would do that. If you have a copy of that spy thingie that comes with visual studio, maybe you could try to see what sort of windows messages are generated when you edit an icon. Also, the edit mode can be toggled by pressing the F2 key, so maybe you could install a keyboard playback hook, and send it a VK_F2 command.
(Playback hooks are very ugly to program, but it can be done.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top