Microsoft KB Archive/216546

{|
 * width="100%"|

INFO: MayChangeDefault Key Needed for IContextMenu to Be Called in Response to a Double-Click

 * }

Q216546

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), on platform(s):
 * Microsoft Windows 98
 * Microsoft Windows 95
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * the operating system: Microsoft Windows 2000

-

SUMMARY
For a context menu's QueryContextMenu function to be called in response to a double-click on a file object already associated with the context menu, the MayChangeDefaultMenu key must be added to the registry as follows:

HKEY_CLASSES_ROOT\CLSID\{CLSID}\ShellEx\MayChangeDefaultMenu where {CLSID} is the CLSID for the context menu extension.

MORE INFORMATION
In IContextMenu::QueryContextMenu, the CMF_DEFAULTONLY flag is set when the user is activating the default action, typically by double-clicking. This flag provides a hint for the context menu extension to add nothing if it does not modify the default item in the menu. A context menu extension or drag-and-drop handler should not add any menu items if this value is specified. A namespace extension should add only the default item (if any).

Additional query words: doubleclick

Keywords : kbContMenu kbExtension kbOSWinNT400 kbOSWin2000 kbSDKPlatform kbSDKWin32 kbOSWin95 kbOSWin98 kbGrpDSShell

Issue type : kbinfo

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch