CRichEditView::GetContextMenu

virtual HMENU GetContextMenu( WORD seltyp**, LPOLEOBJECT** lpoleobj**, CHARRANGE*** lpchrg );

Return Value

Handle to the context menu.

Parameters

seltyp

The selection type. The selection type values are described in the Remarks section.

lpoleobj

Pointer to a OLEOBJECT structure specifying the first selected OLE object if the selection contains one or more OLE items. If the selection contains no items, lpoleobj is NULL. The OLEOBJECT structure holds a pointer to an OLE object v-table.

lpchrg

Pointer to a structure containing the current selection.

Remarks

The framework calls this function as part of the processing of . This function is a typical part of right mouse-button down processing.

The selection type can be any combination of the following flags:

  • SEL_EMPTY   Indicates that there is no current selection.

  • SEL_TEXT   Indicates that the current selection contains text.

  • SEL_OBJECT   Indicates that the current selection contains at least one OLE item.

  • SEL_MULTICHAR   Indicates that the current selection contains more than one character of text.

  • SEL_MULTIOBJECT   Indicates that the current selection contains more than one OLE object.

The default implementation returns NULL. This is an advanced overridable.

For more information, see and in the Win32 documentation.

For more information on the OLEOBJECT type, see the OLE Data Structures and Structure Allocation article in the OLE Knowledge Base.

CRichEditView OverviewClass MembersHierarchy Chart

See Also   CRichEditCtrl::GetSelectionType