Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

OLEMENU Enumeration

Specifies the way the menu belonging to the UI active object is to be used with a component's container menu.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

public enum OLEMENU
public enum OLEMENU
public enum OLEMENU

 Member nameDescription
OLEMENU_CNTRMENUONLYIndicates that all menu commands should be routed to the component. Only the menu of the container should be displayed. 
OLEMENU_MENUMERGEIndicates that the UI active object's menu should merge with the component's container menu. 
OLEMENU_OBJECTMENUONLYIndicates that only the menu of the active object should be displayed. 
OLEMENU_ROUTEACTIVEASCNTRCMDIndicates that commands from the active object menu are routed first to the main component (OLEROLE_MAINCOMPONENT). If the main component does not handle a command, it is then routed to the component that is UI active (visible with focus). OLEMENU_ROUTEACTIVEASCNTRCMD may only be used by a main component that wants to ensure that it is in control of commands that are dispatched to its nested components. It is analogous to OLECOMPFLAG_ROUTEACTIVEASCNTRCMD

The OLEMENU_MENUMERGE, OLEMENU_CNTRMENUONLY, and OLEMENU_OBJECTMENUONLY flags are mutually exclusive.

The hardwired in-place component returns these flags from GetCntrContextMenu to control how the component control's context menu is merged into the container's menu.

COM Signature

From oleipc.idl.

[C++]

Community Additions

ADD
Show:
© 2015 Microsoft