IMessageFormEx::GetMenuCapabilities
The GetMenuCapabilities method is called by Messaging to query the add-in to determine which menu commands it can process (that is, which form menu commands to enable and which to disable).
Syntax
HRESULT GetMenuCapabilities (
DWORD dwFlags,
DWORD * pdwEnable
);
Parameters
- dwFlags
[in] Bitmask specifying the entire set of possible command capabilities. See Remarks for details. - pdwEnable
[out] Reference to another bitmask that specifies the set of menu capabilities that the add-in supports. See Remarks for details.
Return Values
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
- S_OK
Indicates success.
Remarks
Messaging calls the form with GetMenuCapabilities and supplies GetMenuCapabilities with a list of all the menu items that can appear in the menu. This list is contained in the dwFlags parameter and is a bitmask created by combining zero or more command constants using the logical OR. For example, use MESSAGEFORMHOST2_CMDBARCAP_CUT | MESSAGEFORMHOST2_CMDBARCAP_PASTE
to include both the cut and paste menu commands.
GetMenuCapabilities returns a second list that contains just the menu items that the add-in supports. The menu items that appear in the input list, but which are absent in the output list, appear grayed out in the add-in' menu.
The following table contains all the possible constants that can be combined to create dwFlags and pdwEnable. Each constant represents one menu item that can appear on the menu bar.
Command bar capability constant | Value | Description |
---|---|---|
MESSAGEFORMHOST2_CMDBARCAP_COPY | 0x0000001 | Copy the selected text to the clipboard. |
MESSAGEFORMHOST2_CMDBARCAP_CUT | 0x0000002 | Cut (clear and copy) the selected text to the clipboard. |
MESSAGEFORMHOST2_CMDBARCAP_PASTE | 0x0000004 | Paste the selected text from clipboard. |
MESSAGEFORMHOST2_CMDBARCAP_SELECTALL | 0x0000008 | Select all text in the message. |
MESSAGEFORMHOST2_CMDBARCAP_CLEAR | 0x0000010 | Clear the selected text. |
MESSAGEFORMHOST2_CMDBARCAP_FORWARD | 0x0000040 | Forward the message to another recipient. |
MESSAGEFORMHOST2_CMDBARCAP_REPLY | 0x0000080 | Reply to the original sender. |
MESSAGEFORMHOST2_CMDBARCAP_REPLYALL | 0x0000100 | Reply to the original sender and all recipients. |
MESSAGEFORMHOST2_CMDBARCAP_MARKASUNREAD | 0x0000200 | If the message is marked as Read, mark it as Unread. |
MESSAGEFORMHOST2_CMDBARCAP_GETFULLMESSAGE | 0x0000400 | Get full messages, not just the first 100 lines. |
MESSAGEFORMHOST2_CMDBARCAP_MOVETO | 0x0000800 | Move the message to a folder. |
MESSAGEFORMHOST2_CMDBARCAP_LANGUAGE | 0x0001000 | Change the spell check language. |
MESSAGEFORMHOST2_CMDBARCAP_ADDATTACHMENT | 0x0002000 | Add an attachment to the message. |
MESSAGEFORMHOST2_CMDBARCAP_SPELLCHECK | 0x0004000 | Run a spell check on the message. |
MESSAGEFORMHOST2_CMDBARCAP_CHECKNAMES | 0x0008000 | Check recipient names against the address book. |
MESSAGEFORMHOST2_CMDBARCAP_OPTIONS | 0x0020000 | The Options menu. |
MESSAGEFORMHOST2_CMDBARCAP_MYTEXTMESSAGE | 0x0040000 | The My Text menu. |
MESSAGEFORMHOST2_CMDBARCAP_MYTEXTMESSAGESEDIT | 0x0080000 | Edit My Text Messages. |
MESSAGEFORMHOST2_CMDBARCAP_MTGACCEPT | 0x0100000 | Accept a meeting. |
MESSAGEFORMHOST2_CMDBARCAP_MTGDECLINE | 0x0200000 | Decline a meeting. |
MESSAGEFORMHOST2_CMDBARCAP_MTGTENTATIVE | 0x0400000 | Tentatively accept a meeting. |
MESSAGEFORMHOST2_CMDBARCAP_MTGREMOVEFROMCAL | 0x0800000 | Remove the meeting from the calendar. |
MESSAGEFORMHOST2_CMDBARCAP_CONTACTSPICKER | 0x1000000 | Choose a name from Contacts (for To, CC, and BCC). |
MESSAGEFORMHOST2_CMDBARCAP_VOICERECORDER | 0x2000000 | Activate the Voice Recorder. |
Requirements
Pocket PC: Windows Mobile 2003 and later
OS Versions: Windows CE .NET 4.2 and later
Header: cemapi.h
Library: cemapi.lib
See Also
Send feedback on this topic to the authors.
© 2005 Microsoft Corporation. All rights reserved.