Log in

View Full Version : changing shortcut icons for Pocket PC


mcknight
11-12-2002, 09:48 PM
I would like to create a shortcut to an index.html file that will live on the Pocket PC hard drive. The shortcut will live in the start menu and the programs folders. I have already easily done these steps. My problem, however, is that I'm trying to change the icon from the default Explorer to a designed icon for the "site." How do I do it?

(I've tried creating a favicon.ico file and placing it in the same folder as the index.html file but it didn't work).

This seems so simple and I've been searching for an answer but no luck.

Thanks much for any help you can provide! :D

Pony99CA
11-13-2002, 03:23 AM
I would like to create a shortcut to an index.html file that will live on the Pocket PC hard drive. The shortcut will live in the start menu and the programs folders. I have already easily done these steps. My problem, however, is that I'm trying to change the icon from the default Explorer to a designed icon for the "site." How do I do it?

(I've tried creating a favicon.ico file and placing it in the same folder as the index.html file but it didn't work).

This seems so simple and I've been searching for an answer but no luck.

As far as I know, there's no way to associate an icon with a specific file. You may be able to associate a different icon with a class of files (in other words, you can change the icon for all .html files), but not one specific file.

There might be a trick that would get you what you want, though. Here's what I'd try:

1. Create a \HKEY_CLASSES_ROOT\sitefile entry in the registry.
2. Create a key hierarchy identical to that of \HKEY_CLASSES_ROOT\htmlfile.
3. Copy the key values from htmlfile to sitefile
4. Change the DefaultIcon entry to point to your icon file.
5. Create a new file extension in the registry, say \HKEY_CLASSES_ROOT\.site.
6. Create a key hierarchy identical to that of \HKEY_CLASSES_ROOT\.html.
7. Copy the key values from .html to .site.
8. Rename your index.html file to index.site.

Basically, you have a new file type which will work with a browser, but has a different icon.

OK, after all that, it doesn't seem to work. :-( Maybe you can only associate DefaultIcon with an exe file which has an icon compiled in (or else the icon file from my PC isn't the correct format for a Pocket PC). I successfully created a new file which used an icon from another program but which launched a browser window.

So if you have another program with an icon you want to associate with the file, you can change step #4 above to:

4. Copy the DefaultIcon entry from the file you like to the DefaultIcon entry for your file.

If my guess is correct about only working with .exe files, you could create a minimum application with the icon you want in it, but that would be a lot of work for this. You'd have to download the embedded Visual C++ compiler, I suspect; I don't know if there's a resource editor for the Pocket PC.

Steve

Wiggin
11-13-2002, 03:57 AM
OK, after all that, it doesn't seem to work. :-(
Now THAT is what I call a service-oriented enthusiast's site!!
It's good to know that when something doesn't work, folks like Steve are there to try and make matters right.
Good On Ya Steve! :way to go: :werenotworthy:
:beer:

smittyofdhs
11-13-2002, 05:02 PM
There's another way to do this without dealing with the registry....

Following the examples already on the PPC I figured this out. I haven't tried this will all programs but it should work with any chortcut.....

EXAMPLE: ?\folder\filename, -1000

adding the above text (replacing folder with the folder name, filename with the file containing the icon and replacing -1000 with the placement of the icon in the file) to the shortcut allows you to specify an file that contains the icon and which icon to pull. Using Resco File Explorer I went into the windows directory on my Siemens SX56, under windows is a directory called AppButtons. In there are the links for the PIM apps on the device. Viewing the properties of the shortcut I found the following for the calendar link:

:MSCALENDAR?\windows\pimres.dll,-10002

Here is the break down of the above line:

:MSCALENDAR is a built-in link to the calendar program, in the registry this value has been assigned to a specific program. MS did this to make things easier I believe.

?\windows\pimres.dll is the file that contains the icons for all the PIM apps

,-10002 is the location in pimres.dll of the icon that is used for the calendar.

I was able to create a new link and added the above info to change the icon to something other then the default icon.