![]() |
Lost start menu icons? Force Start Menu to refresh!
Force Start Menu to Refresh
For those of us who have as many programs on our flash cards (SD card, CF card, etc.) and who are frustrated with the PocketPC Start Menu icons reverting to the generic "cannot find file" icons, I finally have a fix. Problem ------- The Start Menu icons on Pocket PC revert to generic PocketPC icons and not the correct program icons. Microsoft's response to this is, "sometimes the flash card is slow and icons are loaded before the Today screen is even shown, so if the flash card is not available, icons will not be correct". Research -------- After several hours of research, I have found the following utility, written by Hou Ming in Japan, that solves the problem. I am posting this for others who are searching for a solution to this problem as well and as such am including as many keywords as I can in this posting. At the end of this email is the source code to the utility I mention, and after that is source code I found on Usenet to what is probably considered "the right way to do it", although I find Hou Ming's solution pretty clever. The author also has other utilities, such as a hook that replaces the default PocketPC "File Open" dialog, and allows you to actually navigate to paths other than those Microsoft tries to force us all to use. Hopefully someone who can read Japanese will read this post and tell me the purpose of the other utilities Hou has on his site (see my garbled email address below). Solution -------- RefreshStartMenu.exe is a stand-alone EXE that occupies only 3.5K of storage. As such, it can be placed in main RAM or on a file store without much concern for overhead. The utility does not have an interface because it doesn't need one. Early in my research, I discovered that the Start Menu folder is monitored by Windows CE (aka PocketPC aka Windows Mobile) such that, if a file is copied to "\Windows\Start Menu", it forces a refresh. I was about to write a tool to handle this myself, but correctly guessed someone else had beat me to it. Hou's idea is even more elegant and simple than copying a file and deleting it as I planned on doing. He just tries codes the deletion of a file that doesn't exist and this causes the menu to be refreshed (see code below). Installation ------------ Firstly, download this file: http://www.geocities.co.jp/SiliconVa...hStartMenu.lzh It is compressed with LHArc, a popular compression tool in Japan. If you do not have a program that will unpack a LZH file, search for and download IZArc. It's 100% freeware and handles everything I've ever thrown at it. Make sure your Windows CE device is in the cradle and "synchronized" before you begin these steps. If you don't know how to open the ActiveSync dialog, dismount and remount your PocketPC in the cradle and the dialog should pop up. Below, I install the utility to the file store on my iPaq (because it's non-volitile, meaning it will remain there even after a hard reset), but you can also copy the utility directly to RAM in "\Program Files" and it will work. Do not put this on the flash card too! 1. Unpack RefreshStartMenu.lzh to a temporary folder. 2. Open the Desktop Windows Explorer and navigate to the temporary folder where you just unpacked the LZH file. 3. Select and copy RefreshStartMenu.exe to the clipboard (Click the EXE file, go to the edit menu, Click "Copy"). 4. Click the Explore button on ActiveSync and navigate to "\iPAQ File Store". 5. Paste RefreshStartMenu.Exe to that location (Click "Edit" menu, Click "Paste"). 6. Once it's copied to the file store, create a shortcut to it in the "\Windows\StartUp" folder and you're done! Closing Remarks --------------- Hou Ming's other utilities can be found here: http://www.geocities.co.jp/SiliconVa...upertino/2039/ I also installed "filedlgchg.ARM.CAB" that, via system hook, replaces the default File Open dialog with one that provides the ability to browse the device for a file and does not limit you to just "\My Documents". It can be turned off easily without disturbing the system. Source Code ----------- The following is the C++ source code to Hou's RefreshStartMenu utility, which he posted on his site: #include #include int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { WCHAR stmenu[MAX_PATH]; WCHAR temp[MAX_PATH]; SHGetSpecialFolderPath(NULL,stmenu,CSIDL_STARTMENU ,TRUE); GetTempFileName(stmenu,L"",0,temp); DeleteFile(temp); // Delete non-existing file :) return 0; } The following is Visual Basic source code I found on Usenet. It sends the proper refresh message to the Start Menu, but as you can see, requires more code, at least in VB. Here is the call to the RefreshStartMenu procedure: RefreshStartMenu Me.hwnd ....And below is the actual code ------------------------------- Public Const CSIDL_STARTMENU = &HB Public Const CSIDL_COMMON_STARTMENU = &H16 Public Const SHCNE_ALLEVENTS = &H7FFFFFFF Public Const SHCNF_IDLIST = &H0 Public Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _ (ByVal hwndOwner As Long, _ ByVal nFolder As Long, _ ByRef ppidl As Long) As Long Public Declare Function SHChangeNotify Lib "shell32.dll" _ (ByVal wEventID As Long, _ ByVal uFlags As Long, _ ByVal dwItem1 As Long, _ ByVal dwItem2 As Long) As Long Public Sub RefreshStartMenu(hwnd As Long) Dim lpil As Long SHGetSpecialFolderLocation hwnd, CSIDL_STARTMENU, lpil SHChangeNotify SHCNE_ALLEVENTS, SHCNF_IDLIST, lpil, 0 End Sub ============================= That's it! Note that on my system, when I first tap the Start Menu, there is a delay. Apparently the refresh event lies dormant until you click the start menu itself, and at that time actually loads the icons again. I wonder if calling SHChangeNotify would fix this... Mike Welch Plano (Dallas) Texas Email (* remove upper case): michaelwSPAM@NOtechemailSPAM.com |
Re: Lost start menu icons? Force Start Menu to refresh!
I've been using RefreshStartMenu for some time, along with FontsOnStorage
and FileDialogChanger. It's really excellent software. "Mike Welch" news:b3ce3d49.0404130337.30ac5214@posting.google.c om... > Force Start Menu to Refresh > > For those of us who have as many programs on our flash cards (SD card, > CF card, etc.) and who are frustrated with the PocketPC Start Menu > icons reverting to the generic "cannot find file" icons, I finally > have a fix. > > Problem > ------- > > The Start Menu icons on Pocket PC revert to generic PocketPC icons and > not the correct program icons. Microsoft's response to this is, > "sometimes the flash card is slow and icons are loaded before the > Today screen is even shown, so if the flash card is not available, > icons will not be correct". > > Research > -------- > > After several hours of research, I have found the following utility, > written by Hou Ming in Japan, that solves the problem. I am posting > this for others who are searching for a solution to this problem as > well and as such am including as many keywords as I can in this > posting. > > At the end of this email is the source code to the utility I mention, > and after that is source code I found on Usenet to what is probably > considered "the right way to do it", although I find Hou Ming's > solution pretty clever. > > The author also has other utilities, such as a hook that replaces the > default PocketPC "File Open" dialog, and allows you to actually > navigate to paths other than those Microsoft tries to force us all to > use. Hopefully someone who can read Japanese will read this post and > tell me the purpose of the other utilities Hou has on his site (see my > garbled email address below). > > Solution > -------- > > RefreshStartMenu.exe is a stand-alone EXE that occupies only 3.5K of > storage. As such, it can be placed in main RAM or on a file store > without much concern for overhead. The utility does not have an > interface because it doesn't need one. > > Early in my research, I discovered that the Start Menu folder is > monitored by Windows CE (aka PocketPC aka Windows Mobile) such that, > if a file is copied to "\Windows\Start Menu", it forces a refresh. I > was about to write a tool to handle this myself, but correctly guessed > someone else had beat me to it. > > Hou's idea is even more elegant and simple than copying a file and > deleting it as I planned on doing. He just tries codes the deletion > of a file that doesn't exist and this causes the menu to be refreshed > (see code below). > > Installation > ------------ > > Firstly, download this file: > > http://www.geocities.co.jp/SiliconVa...hStartMenu.lzh > > It is compressed with LHArc, a popular compression tool in Japan. If > you do not have a program that will unpack a LZH file, search for and > download IZArc. It's 100% freeware and handles everything I've ever > thrown at it. > > Make sure your Windows CE device is in the cradle and "synchronized" > before you begin these steps. If you don't know how to open the > ActiveSync dialog, dismount and remount your PocketPC in the cradle > and the dialog should pop up. > > Below, I install the utility to the file store on my iPaq (because > it's non-volitile, meaning it will remain there even after a hard > reset), but you can also copy the utility directly to RAM in "\Program > Files" and it will work. Do not put this on the flash card too! > > 1. Unpack RefreshStartMenu.lzh to a temporary folder. > 2. Open the Desktop Windows Explorer and navigate to the temporary > folder where you just unpacked the LZH file. > 3. Select and copy RefreshStartMenu.exe to the clipboard (Click the > EXE file, go to the edit menu, Click "Copy"). > 4. Click the Explore button on ActiveSync and navigate to "\iPAQ File > Store". > 5. Paste RefreshStartMenu.Exe to that location (Click "Edit" menu, > Click "Paste"). > 6. Once it's copied to the file store, create a shortcut to it in the > "\Windows\StartUp" folder and you're done! > > Closing Remarks > --------------- > > Hou Ming's other utilities can be found here: > > http://www.geocities.co.jp/SiliconVa...upertino/2039/ > > I also installed "filedlgchg.ARM.CAB" that, via system hook, replaces > the default File Open dialog with one that provides the ability to > browse the device for a file and does not limit you to just "\My > Documents". It can be turned off easily without disturbing the > system. > > Source Code > ----------- > > The following is the C++ source code to Hou's RefreshStartMenu > utility, which he posted on his site: > > #include > #include > > int WINAPI WinMain( > HINSTANCE hInstance, > HINSTANCE hPrevInstance, > LPTSTR lpCmdLine, > int nCmdShow) > > { > WCHAR stmenu[MAX_PATH]; > WCHAR temp[MAX_PATH]; > SHGetSpecialFolderPath(NULL,stmenu,CSIDL_STARTMENU ,TRUE); > GetTempFileName(stmenu,L"",0,temp); > DeleteFile(temp); // Delete non-existing file :) > return 0; > } > > The following is Visual Basic source code I found on Usenet. It sends > the proper refresh message to the Start Menu, but as you can see, > requires more code, at least in VB. > > Here is the call to the RefreshStartMenu procedure: > > RefreshStartMenu Me.hwnd > > ...And below is the actual code > ------------------------------- > > Public Const CSIDL_STARTMENU = &HB > Public Const CSIDL_COMMON_STARTMENU = &H16 > Public Const SHCNE_ALLEVENTS = &H7FFFFFFF > Public Const SHCNF_IDLIST = &H0 > > Public Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" _ > (ByVal hwndOwner As Long, _ > ByVal nFolder As Long, _ > ByRef ppidl As Long) As Long > > Public Declare Function SHChangeNotify Lib "shell32.dll" _ > (ByVal wEventID As Long, _ > ByVal uFlags As Long, _ > ByVal dwItem1 As Long, _ > ByVal dwItem2 As Long) As Long > > Public Sub RefreshStartMenu(hwnd As Long) > Dim lpil As Long > > SHGetSpecialFolderLocation hwnd, CSIDL_STARTMENU, lpil > SHChangeNotify SHCNE_ALLEVENTS, SHCNF_IDLIST, lpil, 0 > > End Sub > ============================= > > That's it! Note that on my system, when I first tap the Start Menu, > there is a delay. Apparently the refresh event lies dormant until you > click the start menu itself, and at that time actually loads the icons > again. I wonder if calling SHChangeNotify would fix this... > > Mike Welch > Plano (Dallas) Texas > Email (* remove upper case): michaelwSPAM@NOtechemailSPAM.com |
Re: Lost start menu icons? Force Start Menu to refresh!
Dennis,
How does FontsOnStorage work? Do you create a \Windows\Fonts folder on the flash? There's also a SystemPath utility that looks interesting. Any idea of what it does? "Dennis Langton" > I've been using RefreshStartMenu for some time, along with FontsOnStorage > and FileDialogChanger. It's really excellent software. > > "Mike Welch" > news:b3ce3d49.0404130337.30ac5214@posting.google.c om... > > Force Start Menu to Refresh > > > > For those of us who have as many programs on our flash cards (SD card, > > CF card, etc.) and who are frustrated with the PocketPC Start Menu > > icons reverting to the generic "cannot find file" icons, I finally > > have a fix. > > > > Problem > > ------- > > > > The Start Menu icons on Pocket PC revert to generic PocketPC icons and > > not the correct program icons. Microsoft's response to this is, |
Re: Lost start menu icons? Force Start Menu to refresh!
FYI, for the record, I spent some time in eMbedded VC++ today, to test
to see if the SHChangeNotify call would work as well or maybe even better than the "delete non-existing file" method Hou uses. I discovered that the SHChangeNotify API is NOT SUPPORTED on eVC++. That being the case, our Japanese friend appears to have the very best thing going as a way around sending a notify event. Mike michaelw@techemail.com (Mike Welch) wrote in message news: > Force Start Menu to Refresh > > For those of us who have as many programs on our flash cards (SD card, > CF card, etc.) and who are frustrated with the PocketPC Start Menu > icons reverting to the generic "cannot find file" icons, I finally > have a fix. > > Problem > ------- > > The Start Menu icons on Pocket PC revert to generic PocketPC icons and > not the correct program icons. Microsoft's response to this is, > "sometimes the flash card is slow and icons are loaded before the |
Re: Lost start menu icons? Force Start Menu to refresh!
The FontsOnStorage utility allows you to use fonts from a storage card. You
can either make a folder (anywhere) on the storage card and include the exe file inside the folder, or you can make a folder called "Fonts" in the root of any storage card and put the exe in you main memory. Once you launch the utility, the fonts on the storage card are usable the same as a font in the Fonts folder. The SystemPath utility allows you to modify the path variable on a PocketPC device. The variable isn't really included in the OS, but this utility allows you to modify it anyway. It isn't of much use unless you use the run command or some sort of Pocket DOS. You'll find a link to a picture of the application near the download link. "Mike Welch" news:b3ce3d49.0404131546.72dbb51c@posting.google.c om... > Dennis, > > How does FontsOnStorage work? Do you create a \Windows\Fonts folder on the flash? > > There's also a SystemPath utility that looks interesting. Any idea of what it does? > > "Dennis Langton" news: > > I've been using RefreshStartMenu for some time, along with FontsOnStorage > > and FileDialogChanger. It's really excellent software. > > > > "Mike Welch" > > news:b3ce3d49.0404130337.30ac5214@posting.google.c om... > > > Force Start Menu to Refresh > > > > > > For those of us who have as many programs on our flash cards (SD card, > > > CF card, etc.) and who are frustrated with the PocketPC Start Menu > > > icons reverting to the generic "cannot find file" icons, I finally > > > have a fix. > > > > > > Problem > > > ------- > > > > > > The Start Menu icons on Pocket PC revert to generic PocketPC icons and > > > not the correct program icons. Microsoft's response to this is, |
Re: Lost start menu icons? Force Start Menu to refresh!
Forgot to mention: unless you can decipher Japanese, stay away from the
exesafe app. I'm not sure what it's supposed to do, but I do know it can cause really serious problems if you use it improperly. "Dennis Langton" news:uLvi56cIEHA.828@TK2MSFTNGP12.phx.gbl... > The FontsOnStorage utility allows you to use fonts from a storage card. You > can either make a folder (anywhere) on the storage card and include the exe > file inside the folder, or you can make a folder called "Fonts" in the root > of any storage card and put the exe in you main memory. Once you launch the > utility, the fonts on the storage card are usable the same as a font in the > Fonts folder. > > The SystemPath utility allows you to modify the path variable on a PocketPC > device. The variable isn't really included in the OS, but this utility > allows you to modify it anyway. It isn't of much use unless you use the run > command or some sort of Pocket DOS. You'll find a link to a picture of the > application near the download link. > > "Mike Welch" > news:b3ce3d49.0404131546.72dbb51c@posting.google.c om... > > Dennis, > > > > How does FontsOnStorage work? Do you create a \Windows\Fonts folder on the > flash? > > > > There's also a SystemPath utility that looks interesting. Any idea of > what it does? > > > > "Dennis Langton" > news: > > > I've been using RefreshStartMenu for some time, along with > FontsOnStorage > > > and FileDialogChanger. It's really excellent software. > > > > > > "Mike Welch" > > > news:b3ce3d49.0404130337.30ac5214@posting.google.c om... > > > > Force Start Menu to Refresh > > > > > > > > For those of us who have as many programs on our flash cards (SD card, > > > > CF card, etc.) and who are frustrated with the PocketPC Start Menu > > > > icons reverting to the generic "cannot find file" icons, I finally > > > > have a fix. > > > > > > > > Problem > > > > ------- > > > > > > > > The Start Menu icons on Pocket PC revert to generic PocketPC icons and > > > > not the correct program icons. Microsoft's response to this is, > > |
| All times are GMT -5. The time now is 02:21 AM. |
Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.