Share via


Inbox Menu Extensions

Windows Mobile SupportedWindows Embedded CE Not Supported

8/28/2008

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

Usage

To run the code sample

  1. 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 Mobile 6 SDK\Samples\Common\CPP\Win32\InboxMenuExtensibility

    Microsoft Visual Studio 2005 launches and loads the solution.

  2. Build the solution (Ctrl+Shift+B).

  3. 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

  1. In Visual Studio, right-click the InboxMenuExtensibility project in Solution Explorer, and then click Properties.

  2. Expand Configuration Properties, and click Debugging.

  3. In Debugger to launch:, select Smart Device Native Debugger.

  4. In Remote Executable, type "\Windows\tmail.exe".

  5. Click OK to save your changes.

  6. 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 IContact 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.

Development Environments

SDK: Windows Mobile 6 Professional SDK and Windows Mobile 6 Standard SDK

Development Environment: Visual Studio 2005.

ActiveSync: Version 4.5.

See Also

Concepts

Code Samples for Windows Mobile
Context Menu Extension Handler
Medical History
Read View Menu Extension

Other Resources

Menu Overview
How to Register a File System Shortcut Menu
Registration Format for Application Shortcut Menu Extensions
Messaging