Inbox Menu Extensions
This code sample is named Inbox List View Menu Extensions. It demonstrates how to add new menu options to context menus in the Messaging application. It is not an application, but a DLL that is loaded by Inbox to extend its menus.
Feature Area
Relevant APIs
- Shell and User Interface Reference
- IContextMenu interface
- IMAPIFolder interface
- IMAPIFolder::CopyMessages method
- IMAPIFolder::DeleteMessages method
- IObjectWithSite interface
- Messaging API (MAPI) API
Usage
To run the code sample
Navigate to the solution file (*.sln), and double-click it. By default, the solution files are copied to the following folders:
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Inboxmenuextensibility\``InboxMenuExtensibility.sln
C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Samples\CPP\Win32\Inboxmenuextensibility\``InboxMenuExtensibility.sln
Microsoft Visual Studio 2005 launches and loads the solution.
Build the solution (Ctrl+Shift+B).
Deploy the solution (F5).
After you build this code sample, you can configure Visual Studio 2005 to debug it remotely on the mobile device by following these steps.
To debug this project
- In Visual Studio, right-click the InboxMenuExtensibility project in Solution Explorer, and then click Properties.
- Expand Configuration Properties, and click Debugging.
- In Debugger to launch:, select Smart Device Native Debugger.
- In Remote Executable, type "\Windows\tmail.exe".
- Click OK to save your changes.
- Press F5 to begin debugging.
Using the application
- In message list view, tap & hold a message item. You will see the new menu options in the context menu that appears. These include Add Sender to Contacts, Mark All as Read, and Delete All.
Remarks
InboxMenuExtensibility populates the appropriate registry settings via DllRegisterServer, which is called when the solution is deployed to a device.
The menu option Add Sender to Contacts creates a new Contact item, populates its FileAs property with the e-mail message's Display Name, and populates the Email property with the e-mail message's Email Address. If there is no Display Name, it only populates the Email property. This menu option does not parse the display name or e-mail address, and it is enabled for incoming mail folders only. It does not appear in Outbox, Sent Items, or Drafts. It appears on single message items only.
It is assumed that you have both "read" and "unread" e-mail in your Inbox.
Requirements
Pocket PC SDK: Windows Mobile 5.0 Pocket PC SDK.
Smartphone SDK: Windows Mobile 5.0 Smartphone SDK.
Development Environment: Visual Studio 2005.
ActiveSync: Version 4.0.
See Also
Code Samples | Menu Overview | How to: Register a File System Shortcut Menu | Registration Format for Application Shortcut Menu Extensions | Context Menu Extension Handler | Messaging | Medical History | Read View Menu Extension
Send Feedback on this topic to the authors