Menu Overview
4/19/2010
The menu bar in Windows Mobile Professional and Windows Mobile Classic is replaced with soft keys that access menus and define the ways in which they are displayed. For any application that has one or two menus and that is compiled against the Windows Mobile SDK, the menus are rendered as soft keys. Windows Mobile supports two soft keys, SK1 and SK2. SK1 is the left soft key and is usually used for the most common action for the application. SK2 is the right soft key and is usually used to display the rest of the applications commands on a menu that is displayed when SK2 is selected.
Note that beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones. **
In Windows Mobile 6.5, all Microsoft applications use soft keys on Windows Mobile Professional, Windows Mobile Classic and Windows Mobile Standard. Support is provided for OEM–customized soft keys.
Shortcut menus appear when the user taps the stylus at a point on the screen and holds it down for a short period. When the stylus is held down in a position served by a shortcut menu, animated feedback around the point of the stylus signals that a shortcut menu is going to appear. The tap–and–hold gesture for displaying shortcut menus is recognized by using the SHRecognizeGesture function in the WM_LBUTTONDOWN message handler. The shortcut menu provides commands that are useful in the context of the object under the stylus. For example, common shortcut menu commands are Cut, Copy, Paste, and Refresh. The menu can be displayed from an existing menu resource, or constructed dynamically by using the Windows Management AppendMenu function. You can also dynamically add items to an existing menu resource. Dynamically adding items to the menu is slower than using a predefined resource. but is an option if you need to create such dynamic behavior.
If you want to customize file lists with your own menu options for specific file types, you can extend shortcut menus that appear in file lists in any application. For Windows Mobile, you can give users additional menu options when they tap and hold a .doc file in Word Mobile, or when they tap and hold a .jpg file in File Explorer Mobile.
A shortcut menu extension is implemented as a COM server component. You can use an abstraction interface exposed by the application that you are adding your component to. Your component gets application-specific information through this interface. The shell sets the application's abstraction interface to be the site of your component with a call to your implementation of IObjectWithSite::SetSite. When the user opens a menu containing your extension, the shell calls your implementation of IContextMenu::QueryContextMenu to show the new commands your extension makes available. When the user selects one of the new commands, the application calls SHInvokeContextMenuCommand, which in turn calls your implementation of IContextMenu::InvokeCommand. Your component gets a reference to the application abstraction interface by calling your implementation of IObjectWithSite::GetSite.
The following tables provide information about where you can extend the softkey menu and shortcut menus in the Windows Mobile device user interface. They also provide details about the abstraction interface to use, which header file to include, and the registration information you'll need to register a menu extension in each UI location.
The Location in User Interface column, can either be the Summary screen, which refers to the window that shows the existing list of files created by the application, or it can be the Main screen, which refers to the editable window that provides core application functionality. An example Windows Mobile would be the blank document that appears when you tap New on Excel Mobile ** summary screen.
- You use the information contained in the Context and Class columns to register application shortcut menu extensions. For more information, see Registration Format for Application Shortcut Menu Extensions.
ActiveSync
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
ActiveSync Tools menu |
ActiveSync |
ActiveSyncConnect |
None |
None |
None |
|
Inbox
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Account/Folders dialog box |
Inbox |
AccFolder_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Folder currently selected in the list (ITI_FolderItemRef). |
Account Setup dialog box |
Inbox |
Account_Setup |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Message store currently selected in the list (ITI_StoreItemRef). |
Specific compose form in Inbox |
Inbox |
Compose_%s |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Replace %s with the class of the message whose menu you want to extend. For example, Compose_IPM.Note would be the Class if you wanted a menu extension that only showed up in standard IPM.Note (e-mail) compose forms. The first entry is message (ITI_MessageItemRef). The second entry is the IMessageFormEx pointer (ITI_MessageFormExItemRef). |
All compose forms in Inbox |
Inbox |
Compose_View |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
This class applies to all compose forms. The first entry is message (ITI_MessageItemRef). The second entry is the IMessageFormEx pointer (ITI_MessageFormExItemRef). |
Main listview in Inbox |
Inbox |
List_View |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
The first entry is the current folder (ITI_FolderItemRef), followed by the ENTRYIDs of selected messages (ITI_MessageItemRef). |
Context menu in listview |
Inbox |
List_View_Context |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
The first entry is the current folder (ITI_FolderItemRef), followed by ENTRYIDs of selected messages (ITI_MessageItemRef). |
Specific read form in Inbox |
Inbox |
Read_%s |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Replace %s with the class of the message whose menu you want to extend. For example, Read_IPM.Schedule.Meeting.Request would be the Class if you wanted a menu extension that only showed up in meeting request read forms. The first entry is message (ITI_MessageItemRef). The second entry is the IMessageFormEx pointer (ITI_MessageFormExItemRef). |
All read forms in Inbox |
Inbox |
Read_View |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
This class applies to all read forms. The first entry is the message (ITI_MessageItemRef). The second entry is the IMessageFormEx pointer (ITI_MessageFormExItemRef). |
Contacts
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Legacy main softkey menu (tpc) |
AppView |
MSContacts |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Summary screen menu |
Contacts |
Card_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Contact Chooser softkey |
Contacts |
Chooser_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Edit Card softkey |
Contacts |
Edit_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Main context menu |
Contacts |
Main_ContextMenu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Main screen softkey |
Contacts |
Main_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Legacy Tools menu |
Contacts |
Main_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Legacy main screen View menu |
Contacts |
Main_View |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Legacy Summary screen Tools |
Contacts |
Summary_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
TPC Call Log |
AppView |
MSClog |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
TPC Dialer |
AppView |
MSCdial |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
TPC Shortcuts |
AppView |
MSSCut |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Windows Mobile Professional Call Log |
Phone |
Log |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Windows Mobile Professional Speed dial |
Phone |
MSScut |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Windows Mobile Professional App and TPC CProg |
Phone |
MSCProg |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Calendar
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Summary screen softkey |
Calendar |
Card_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Legacy Edit Screen Edit menu |
Calendar |
Edit_Edit |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Main screen softkey menu |
Calendar |
Main_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Legacy Main screen Tools menu |
Calendar |
Main_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Legacy Summary screen Tools menu |
Calendar |
Summary_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Tasks
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Summary screen softkey |
Tasks |
Card_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Edit Card softkey |
Tasks |
Edit_Edit |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Main screen context menu |
Tasks |
Main_ContextMenu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Main softkey menu in Tasks |
Tasks |
Main_Menu |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Legacy main app Tools menu |
Tasks |
Main_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Legacy Summary screen Tools menu |
Tasks |
Summary_Tools |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
|
Imaging
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Context menu in Thumbnail View |
Pictures |
imagefile |
IDataObject |
CF_HDROP |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Context menu in Thumbnail View |
PicturePicker |
imagefile |
IDataObject |
CFNAME_ITEMREFARRAY |
appext.h |
Only supported in Windows Mobile Version 5.0 and later. |
Connectivity
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
Location in User Interface | Context | Class | Interface | Clipboard format | Header file | Notes |
---|---|---|---|---|---|---|
Bluetooth dialog under Connection Settings |
Bluetooth |
Bluetooth_Menu |
IUnknown |
none |
none |
Support for these items was added to Bluetooth UI menu extensions on Windows Mobile Standard. |
Remarks
The function CePimCommand has been deprecated and is no longer used for creating Outlook Mobile menu add-ins. Use the function IContextMenu instead.
IOleWindow is simply a wrapper around a window handle. IDataObject is used by your component to get data that has an associated clipboard format. For more information, see How to Implement IDataObject.
See Also
Tasks
Concepts
How to Display a Shortcut Menu from an Existing Resource
How to Implement IContextMenu and IObjectWithSite
How to Implement IDataObject
How to Prevent Tap-and-Hold Animation Display
How to Register a File System Shortcut Menu
Registration Format for Application Shortcut Menu Extensions