Some shortcuts on the start menu of a Windows Mobile 5.0 Smartphone show a different icon when they're selected. The Messaging icon shows the slip of paper poking out of the envelope, for example.
Has anyone managed to recreate this with their own applications, and if so, how
Is there a convention for how the icons have to be ordered in the .rc file or is there a naming convention
Is there a URL talking about this in MSDN
Thanks in advance,
Matt

two-state icons on Windows Mobile 5.0 start menu (grid view)
ggvw
can u please give some example how to edit the .lnk file , it will e very useful to me.
thanks
Andi_DE
this is what MSDN has to say on the subject (not sure why the format is all weird; sorry):
...
A .lnk file is a text file that contains the command line for the linked target, which can be enclosed in double quotation marks, along with the length of that command line.
You can also choose to pass parameters into the linked target. However, this is behavior that can be changed if the shortcut module is replaced in Coredll.dll.
By default, an .lnk file uses the following format.
[number of ASCII characters after pound sign allocated to command-line arguments]#[command line] [optional parameters]
For example, to start MyApp.exe and pass two optional parameters into the application, a sample MyApp.lnk file contains the following syntax.
40#\Windows\MyApp.exe parameter1 parameter2
Steve Westlake
ekolis
Can u please tell me that before this step which step i have to follow
vishal
MFaulk
hi,
I have been wondering what kind of control is the start menu of wm 5.0 smartphone, is it a ListView control with LVS_ICON style the different i noticed are when the item is selected/focused the icon will be changed and the focus rectangle will be on the icon only not the text itself. Anyone know how to accomplish above 2 effects any good guides or info are welcome and appreciated.
thanks in advance
zbee
<ignored>#<target app> <full path of icon or DLL file containing icon>,<index of icon>
or
<ignored>#<target app> <full path of icon or DLL file containing icon>,-<resource ID of icon>
Cheers,
Chris.
Dc123
That page is sort of a great example of why I asked the question - it doesn't mention the " <full path of icon or DLL file containing icon>,<index of icon>" bit at all, so does that mean it's an undocumented feature, or is that MSDN page (google gave me http://msdn2.microsoft.com/en-us/library/ms861519.aspx based on your quote) just incomplete
FrannieG
hi
i have edited the registry values as given but seen no effect on the icon
are there any pervious steps to be followed before changing registry
please do reply
thanks
vishal
ChaosGeorge
HKEY_CLASSSES_ROOT\classname
\DefaultIcon = <module>,-<icon ID>
\SelectIcon = <module>,-<icon ID>
Then, there is the preexisting way to map an extension into a class, so that all files with that extension get those default icons and other class properties automatically:
HKEY_CLASSES_ROOT\.file-extension
\(Default) = classname
And starting with WM 5.0 you can also override the icon associated with a link (which is what ends up in the start menu folder) with a class (before you could only override it with a single icon), using the following syntax in the icon file:
<ignored>#<target app> :classname
Applications can retrieve the selected icon corresponding to any file by passing the new flag SHGFI_SELECTICON to SHGetFileInfo. This is how the start menu works.
This information should be part of the SDK soon.
Hope this helps
Eddy
nothinghotmailcom
source: http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/wce51conUserInterfaceProductReference.asp
Golem
If you want elements of file class "foo" to have different default and selection icons, your registry changes should be done to the reg key:
HKEY_CLASSES_ROOT\foo
Then, the .lnk file that you install in the start menu folder to represent the "foo.exe" application would contain the following
#foo.exe :foo
Does this make sense
Thanks,
Eddy
firec
UmerKhan
did you edit the text in your start menu shortcut file (.lnk) in the manner outlined above:
<ignored>#<target app> :classname
the "classname" should be the same as the class name you used in your registry modifications.
Eddy
Jay T
I've also been looking at a similar problem for a while, that of specifying an icon for an application which is different from/not part of the executable itself (for large executables, the time the device needs to locate and display the icon can mount up into the 10s of seconds, particularly for files on flash or card).
I came across a similar solution to the one from Eddy above, which was actually backwards compatible with older (2002, 2003 and 2003SE) devices, using the following syntax in the icon file:
<ignored>#<target app> <full path of icon or DLL file containing icon>,<index of icon>
or
<ignored>#<target app> <full path of icon or DLL file containing icon>,-<resource ID of icon>
Doing this manually is trivial, but I've not been able to find an automatic way of creating shortcuts like this via the .inf file definitions (necessary if you support the %CEn% macros within your shortcut creation or file installation).
I'm fairly certain that it may be possible to fudge this by executing some code in the setup DLL during INSTALL_EXIT to "edit" the shortcut file, but this feels a little inelegant and potentially risky.
Has anyone come across a way to specify this extra part of the shortcut within the .inf file
Kieren