Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Shell_MergeMenus function

[Shell_MergeMenus is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Merges two menus.

Syntax


UINT Shell_MergeMenus(
  _In_  HMENU hmDst,
  _In_  HMENU hmSrc,
  UINT uInsert,
  UINT uIDAdjust,
  UINT uIDAdjustMax,
  ULONG uFlags
);

Parameters

hmDst [in]

Type: HMENU

The destination menu to which hmSrc is added.

hmSrc [in]

Type: HMENU

The source menu which is added to hmDst.

uInsert

Type: UINT

The point in hmDst after which the entries in hmSrc are inserted.

uIDAdjust

Type: UINT

This number is added to each menu's ID to give an adjusted ID. Set to 0 for no adjustment. The value for uIDAdjust would typically be the number of items in hmDst. This number can be obtained using the GetMenuItemCount.

uIDAdjustMax

Type: UINT

The maximum adjusted ID to add to the menu. Any adjusted ID greater than this value is not added. To allow all IDs, set this parameter to 0xFFFF.

uFlags

Type: ULONG

One or more of the following flags.

MM_ADDSEPARATOR

Add a separator between the items from the two menus if one does not exist already. If you are inserting the entries from hmSrc into the middle of hmDst, a separator is added above and below the hmSrc material.

MM_DONTREMOVESEPS

Do not remove any existing separators in the two menus. Note that this could result in two separators in a row.

MM_SUBMENUSHAVEIDS

Set this flag if the submenus have IDs which should be adjusted.

Return value

Type: UINT

Returns the next open ID at the end of the menu (the maximum adjusted ID + 1).

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP with SP2

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 6.0 or later)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.