OleSetMenuDescriptor

This function installs or removes OLE dispatching code from the container's frame window.

WINOLEAPI OleSetMenuDescriptor( 
  HOLEMENU holemenu, 
  HWND hwndFrame, 
  HWND hwndActiveObject, 
  LPOLEINPLACEFRAME lpFrame, 
  LPOLEINPLACEACTIVEOBJECT lpActiveObj 
);

Parameters

  • holemenu
    [in] Handle to the composite menu descriptor returned by the OleCreateMenuDescriptor function. If NULL, the dispatching code is unhooked.
  • hwndFrame
    [in] Handle to the container's frame window where the in-place composite menu is to be installed.
  • hwndActiveObject
    [in] Handle to the object's in-place activation window. OLE dispatches menu messages and commands to this window.
  • lpFrame
    [in] Long pointer to the IOleInPlaceFrame interface on the container's frame window.
  • lpActiveObj
    [in] Long pointer to the IOleInPlaceActiveObject interface on the active in-place object.

Return Values

The following table shows the HRESULT values that can be returned by this function.

Value Description
S_OK The menu was installed correctly.
E_FAIL The function has failed.
E_INVALIDARG The function has failed.
E_UNEXPECTED The function has failed.

Remarks

The hwndActiveObject and the lpActiveObj parameters are not supported. Set to NULL.

The container should call OleSetMenuDescriptor to install the dispatching code on hwndFrame when the object calls the IOleInPlaceFrame::SetMenu method, or to remove the dispatching code by passing NULL as the value for holemenu to OleSetMenuDescriptor.

If both the lpFrame and lpActiveObj parameters are non-NULL, OLE installs the context-sensitive help F1 message filter for the application. Otherwise, the application must supply its own message filter.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Ole2.h.
Link Library: Ole32.lib.

See Also

OleSetMenuDescriptor | Determining Supported COM APIs

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.