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

ID: Q216546


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK), on platform(s):
    • Microsoft Windows versions 95, 98
    • Microsoft Windows NT 4.0
    • 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 kbNTOS400 kbWinOS2000 kbSDKPlatform kbSDKWin32 kbWinOS95 kbWinOS98 kbGrpShell
Version : WINDOWS:95,98
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 19, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.