Change windows icons

I want to create a small program that change the static icons , like My computer , recycle bin etc.

Which api do I need to use?

I am using windows 98.

What is the differents between windows 98 and NT in this problem?

I need an example of changing one of them.

SelaYAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhanceCommented:
Which api do I need to use?

The IShellLink interface and in particular the IShellLink::SetIconLocation function.

I am using windows 98.

What is the differents between windows 98 and NT in this problem?

Nothing, 95, 98, NT4, and Win2K use the same interface.  This is a Windows Shell interface so any Windows platform that uses the shell will support it.

I need an example of changing one of them.

The SHORTCUT sample program give an example of using this interface.  You can download it from MSDN:

http://msdn.microsoft.com/library/books/win95ui/chpt09-04.htm


Also, there is more information here:
http://support.microsoft.com/support/kb/articles/Q179/9/04.ASP


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jhanceCommented:
BTW, there is a really good book on this subject that I'd recommend.  It's Visual C++ Windows Shell Programming by Dino Esposito and published by WROX Press.
0
chensuCommented:
I guess jhance misunderstood the question. What SelaY wants to change is the Shell Namespace Extension icons. They are somewhere in the Registry.
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

jhanceCommented:
chensu,

If I'm not mistaken, the same procedure applies to all icons on the desktop.  If they are not shortcuts you have to refer to them by their PIDL.  It's is true that the actual icon is stored in the registry but the proper way to access and change the icon is via the IShellLink interface.
0
chensuCommented:
I think IShellLink creates a shortcut, which refers to a file or a non-file object. Yes, you use a PIDL for a non-file object. But it is still a shortcut, of which icon has a link overlay (a small arrow). For example, you can use IShellLink to create a shortcut for My Computer. But My Computer on the Desktop is not a shortcut.

In addition, Recycle Bin has two icons; one is full; another is empty.
0
SelaYAuthor Commented:
I need an example of using the IShellLinks?

For example ,get the path from an icon on the desktop.



0
jhanceCommented:
Did you check the two URLs I posted already?  Both have examples of using the IShellLink interface and retrieving the path from an icon.
0
chensuCommented:
There are two kinds of icons on the desktop; one is the shortcut icon; another is the shell namespace extension icon.

SelaY,

Have you read all the comments?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.