Adding Custom Menus to Windows CE Explorer

Windows CE Services allows additional menu items to be added to the Tools menu in the Explorer window in two different ways. The method described in this section uses code to directly place values in the proper registry locations. You can also use the CEUTIL utility DLL to create custom menus and perform other tasks.

In order 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 under 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