Upravit

Sdílet prostřednictvím


OleCreateMenuDescriptor function (ole2.h)

Creates and returns an OLE menu descriptor (that is, an OLE-provided data structure that describes the menus) for OLE to use when dispatching menu messages and commands.

Syntax

HOLEMENU OleCreateMenuDescriptor(
  [in] HMENU                hmenuCombined,
  [in] LPOLEMENUGROUPWIDTHS lpMenuWidths
);

Parameters

[in] hmenuCombined

Handle to the combined menu created by the object.

[in] lpMenuWidths

Pointer to an array of six LONG values giving the number of menus in each group.

Return value

Returns the handle to the descriptor, or NULL if insufficient memory is available.

Remarks

The OleCreateMenuDescriptor function can be called by the object to create a descriptor for the composite menu. OLE then uses this descriptor to dispatch menu messages and commands. To free the shared menu descriptor when it is no longer needed, the container should call the companion helper function, OleDestroyMenuDescriptor.

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-3 (introduced in Windows 10, version 10.0.10240)

See also

OleDestroyMenuDescriptor