Export (0) Print
Expand All

OleSetMenuDescriptor function

Installs or removes OLE dispatching code from the container's frame window.

Syntax


HRESULT OleSetMenuDescriptor(
  _In_  HOLEMENU holemenu,
  _In_  HWND hwndFrame,
  _In_  HWND hwndActiveObject,
  _In_  LPOLEINPLACEFRAME lpFrame,
  _In_  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]

Pointer to the IOleInPlaceFrame interface on the container's frame window.

lpActiveObj [in]

Pointer to the IOleInPlaceActiveObject interface on the active in-place object.

Return value

This function returns S_OK on success.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ole2.h

Library

Ole32.lib

DLL

Ole32.dll

See also

OleCreateMenuDescriptor
IOleInPlaceFrame::SetMenu
IOleInPlaceActiveObject

 

 

Community Additions

ADD
Show:
© 2014 Microsoft