Adding Custom Menus to Windows CE Explorer

You can add additional menu items to the Tools menu in the Windows CE Explorer window in two different ways. The method described here uses code to directly place values in the proper registry locations. You can also use the CEUTIL utility DLL, described in "Using the CEUTIL Helper DLL for Windows CE Services," to create custom menus and perform other tasks.

To add a custom menu, create a subkey and add several values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\ CustomMenus as follows.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS CE Services\CustomMenus]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS 
CE Services\CustomMenus\subkey]
"DisplayName"="displayName"
"Command"="myApp.exe"
"StatusHelp"="StatusHelpText"
"Version"=version_number
subkey
String that identifies the subkey to be created on the Tools menu.
displayName
String that identifies the display name of the menu item. An ampersand (&) specifies a hot key.
myApp.exe
String that identifies the command that will be executed by WinExec when a user chooses the menu item.
StatusHelpText
String that identifies the status and Help text that appears in the status bar when a user browses the menu item.
version_number
Application version. This value should be 0x00020000.

The following sample registry file adds a calculator menu item.

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS CE Services\CustomMenus]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS 
CE Services\CustomMenus\MyApp]
"DisplayName"="&My Calculator"
"Command"="calc.exe"
"StatusHelp"="Brings up the calculator"
"Version"=dword:00020000