[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.
UINT Shell_MergeMenus( HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags );
The destination menu to which hmSrc is added.
The source menu which is added to hmDst.
The point in hmDst after which the entries in hmSrc are inserted.
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.
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.
One or more of the following flags.
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.
Do not remove any existing separators in the two menus. Note that this could result in two separators in a row.
Set this flag if the submenus have IDs which should be adjusted.
Returns the next open ID at the end of the menu (the maximum adjusted ID + 1).
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||shlobj_core.h (include Shlobj.h)|
|DLL||Shell32.dll (version 6.0 or later)|