MSAAMENUINFO
Server developers use the MSAAMENUINFO structure to expose the names of owner-drawn menu items.
typedef struct tagMSAAMENUINFO {
DWORD dwMSAASignature;
DWORD cchWText;
LPWSTR pszWText;
} MSAAMENUINFO,* LPMSAAMENUINFO;
Members
- dwMSAASignature
Must be the value MSAA_MENU_SIG, which is defined in oleacc.h. - cchWText
Length, in characters, of the text for the menu item, excluding the Unicode null-terminated character. - pszWText
The text of the menu item, in Unicode, including the Unicode null-terminated character.
Remarks
By associating the MSAAMENUINFO structure with owner-drawn menu item data, server developers can expose the menu items without having to implement IAccessible.
The MSAAMENUINFO structure is the first member of the application-specific structure (or class) that contains the data for an owner-drawn menu item, which is pointed to by the dwItemData member of the MENUITEMINFO structure.
The MSAAMENUINFO structure cannot be a member in a class that contains virtual functions because the first member of the class is always a compiler-generated pointer to a table of the virtual functions. To work around this problem, you can implement a structure that contains the MSAAMENUINFO as the first member, and a pointer to the class with the virtual functions as a second member, which contains the owner-drawn item data.
Example
The following code fragment shows the declaration of an application-specific owner-drawn menu information structure that includes MSAAMENUINFO:
// Application-specific owner-drawn menu info struct. Owner-drawn data // is a pointer to one of these. MSAAMENUINFO must be the first // member. struct MenuEntry { MSAAMENUINFO m_MSAA; // MSAA info - must be first element. LPTSTR m_pName; // Menu text, for display. NULL for // separator item. int m_CmdID; // Menu command ID. int m_IconIndex; // Index of icon in bitmap. };
Requirements
** Windows NT/2000/XP/Server 2003:** Included in Windows 2000 and later.
** Windows 95/98/Me:** Included in Windows 98 and later.
** Redistributable:** Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
** Header:** Declared in Oleacc.h.