Skip to content

Latest commit

 

History

History
197 lines (155 loc) · 6.11 KB

nf-richole-iricheditolecallback-getcontextmenu.md

File metadata and controls

197 lines (155 loc) · 6.11 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:richole.IRichEditOleCallback.GetContextMenu
IRichEditOleCallback::GetContextMenu (richole.h)
Queries the application for a context menu to use on a right-click event.
GCM_RIGHTMOUSEDROP
GetContextMenu
GetContextMenu method [Windows Controls]
GetContextMenu method [Windows Controls]
IRichEditOleCallback interface
IRichEditOleCallback interface [Windows Controls]
GetContextMenu method
IRichEditOleCallback.GetContextMenu
IRichEditOleCallback::GetContextMenu
SEL_EMPTY
SEL_MULTICHAR
SEL_MULTIOBJECT
SEL_OBJECT
SEL_TEXT
_win32_IRichEditOleCallback_GetContextMenu
_win32_IRichEditOleCallback_GetContextMenu_cpp
controls.IRichEditOleCallback_GetContextMenu
controls._win32_IRichEditOleCallback_GetContextMenu
richole/IRichEditOleCallback::GetContextMenu
controls\IRichEditOleCallback_GetContextMenu.htm
Controls
VS|Controls|~\controls\richedit\richeditcontrols\richeditcontrolreference\richeditinterfaces\iricheditolecallback\iricheditolecallbackgetcontextmenu.htm
12/05/2018
GCM_RIGHTMOUSEDROP, GetContextMenu, GetContextMenu method [Windows Controls], GetContextMenu method [Windows Controls],IRichEditOleCallback interface, IRichEditOleCallback interface [Windows Controls],GetContextMenu method, IRichEditOleCallback.GetContextMenu, IRichEditOleCallback::GetContextMenu, SEL_EMPTY, SEL_MULTICHAR, SEL_MULTIOBJECT, SEL_OBJECT, SEL_TEXT, _win32_IRichEditOleCallback_GetContextMenu, _win32_IRichEditOleCallback_GetContextMenu_cpp, controls.IRichEditOleCallback_GetContextMenu, controls._win32_IRichEditOleCallback_GetContextMenu, richole/IRichEditOleCallback::GetContextMenu
richole.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Msftedit.dll
Windows
19H1
IRichEditOleCallback::GetContextMenu
richole/IRichEditOleCallback::GetContextMenu
c++
APIRef
kbSyntax
COM
Msftedit.dll
IRichEditOleCallback.GetContextMenu

IRichEditOleCallback::GetContextMenu

-description

Queries the application for a context menu to use on a right-click event.

-parameters

-param seltype

Type: WORD

Selection type. The value, which specifies the contents of the new selection, can be one or more of the following values.

Value Meaning
SEL_EMPTY
The selection is empty.
SEL_TEXT
Text.
SEL_OBJECT
At least one COM object.
SEL_MULTICHAR
More than one character of text.
SEL_MULTIOBJECT
More than one COM object.
GCM_RIGHTMOUSEDROP
Indicates that a context menu for a right-mouse drag drop should be generated. The lpoleobj parameter is a pointer to the IDataObject interface for the object being dropped.

-param lpoleobj

Type: LPOLEOBJECT

Pointer to an interface. If the seltype parameter includes the SEL_OBJECT flag, lpoleobj is a pointer to the IOleObject interface for the first selected COM object. If seltype includes the GCM_RIGHTMOUSEDROP flag, lpoleobj is a pointer to an IDataObject interface. Otherwise, lpoleobj is NULL. If you hold on to the interface pointer, you must call the AddRef method to increment the object's reference count.

-param lpchrg

Type: CHARRANGE*

Pointer to a CHARRANGE structure containing the current selection.

-param lphmenu

Type: HMENU*

The handle of a context menu to use. This parameter is ignored if an error is returned. A rich edit control destroys the menu when it is finished with it so the client should not.

-returns

Type: HRESULT

Returns S_OK on success. If the method fails, it can be the following value.

Return code Description
E_INVALIDARG
There was an invalid argument.

-remarks

When the user selects an item from the context window, a WM_COMMAND message is sent to the parent window of the rich edit control.

-see-also

CHARRANGE

GETCONTEXTMENUEX

IRichEditOleCallback

Reference