Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
[in] holemenu
Handle to the composite menu descriptor returned by the OleCreateMenuDescriptor function. If NULL, the dispatching code is unhooked.
[in] hwndFrame
Handle to the container's frame window where the in-place composite menu is to be installed.
[in] hwndActiveObject
Handle to the object's in-place activation window. OLE dispatches menu messages and commands to this window.
[in] lpFrame
Pointer to the IOleInPlaceFrame interface on the container's frame window.
[in] lpActiveObj
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ole2.h |
Library | Ole32.lib |
DLL | Ole32.dll |
API set | ext-ms-win-com-ole32-l1-1-5 (introduced in Windows 10, version 10.0.15063) |