Click here to Skip to main content
12,067,278 members (54,491 online)
Click here to Skip to main content

Stats

39.5K views
3K downloads
60 bookmarked
Posted

.NET Shell Extensions - Shell Preview Handlers

, 20 May 2014 MIT
Quickly create Shell Preview Handlers for Windows or Outlook using .NET!
SharpShell_Core_Library.zip
SharpShell.dll
SharpShell_Source_Code.zip
SharpShell Source Code
Dependencies
Apex
Apex.WinForms.dll
SharpShell
packages
Apex.1.5.0
Apex.1.5.0.nupkg
lib
net35
Apex.dll
net40
Apex.dll
sl30
Apex.Silverlight.dll
sl3-wp
Apex.WP7.dll
sl40
Apex.Silverlight4.dll
sl4-wp71
Apex.WP7.dll
sl50
Apex.Silverlight.dll
ILMerge.2.12.0803
ILMerge.2.12.0803.nupkg
ILMerge.doc
ILMerge.exe
NUnit.2.6.2
lib
nunit.framework.dll
NUnit.2.6.2.nupkg
NUnit.2.6.2.nuspec
Samples
ContextMenu
ContextMenuComponent
Properties
ContextMenuSample
Properties
CountLinesExtension
CountLinesExtension.csproj.vspscc
Key.snk
Properties
Resources
CountLines.bmp
DllContextMenuExtension
DllContextMenuExtension.csproj.vspscc
Key.snk
Properties
IsolatedContextMenuComponent
Diagnostics
Interop
Properties
ServerRegistration
SharpContextMenu
DropHandler
XsdDropHandler
ExampleFiles
Key.snk
Properties
XsdDropHandler.csproj.vspscc
IconHandler
DllIconHandler
DllIconHandler.csproj.vspscc
Key.snk
Properties
Resources
ManagedDll.ico
NativeDll.ico
IconOverlayHandler
ReadOnlyFileIconOverlayHandler
Key.snk
Properties
ReadOnlyFileIconOverlayHandler.csproj.vspscc
Resources
ReadOnly.ico
InfoTipHandler
FolderInfoTipHandler
FolderInfoTipHandler.csproj.vspscc
Key.snk
Properties
PreviewHandler
IconPreviewHandler
Dependencies
IconLib.dll
IconLib.dll
IconPreviewHandler.csproj.user
IconPreviewHandler.csproj.vspscc
Key.snk
Properties
PropertySheet
DrivePropertySheet
DrivePropertySheet.csproj.vspscc
Key.snk
Properties
ResourcesPropertySheet
Key.snk
Properties
ResourcesPropertySheet.csproj.vspscc
TextFilePropertySheet
Key.snk
Properties
TextFilePropertySheet.csproj.vspscc
SharpShell
Attributes
Diagnostics
Extensions
Interop
Key.snk
NativeBridge
SharpShellNativeBridge32.dll
SharpShellNativeBridge64.dll
Properties
ServerRegistration
SharpContextMenu
SharpDropHandler
SharpIconHandler
SharpIconOverlayHandler
SharpInfoTipHandler
SharpPreviewHandler
SharpPropertySheet
SharpShell.csproj.user
SharpShell.csproj.vspscc
SharpShellNativeBridge
SharpShellNativeBridge.aps
SharpShellNativeBridge.vcxproj.filters
SharpShellNativeBridge.vcxproj.user
SharpShellNativeBridge.vcxproj.vspscc
SharpShellNativeBridge1.aps
Tools
ExtensionManager
Properties
Settings.settings
Resources
xsd.ico
ServerInspector
Properties
Settings.settings
ServerInspector.csproj.vspscc
Servers
ServerManager
About
LogView
Properties
Settings.settings
Resources
ChangeYourView.png
ContextMenu.png
Icon.png
IconOverlayHandler.png
InfoTip.png
openHS.png
PlayHS.png
PropertySheet.png
View_Details.png
View_LargeIcons.png
View_List.png
View_SmallIcons.png
View_Tiles.png
ServerDetails
ServerManager.csproj.user
ServerManager.csproj.vspscc
SharpShell.ico
TestShell
ShellExtensionManager
Properties
Settings.settings
ShellExtensionManager.csproj.vspscc
SharpShell_Tools.zip
SharpShell.dll
Apex.WinForms.dll
ServerManager.exe
Apex.dll
ServerInspector.exe
using System;

namespace SharpShell.Interop
{
    /// <summary>
    /// Flags that specify how the shortcut menu can be changed.
    /// </summary>
    [Flags]
    public enum CMF : uint
    {
        /// <summary>
        /// Indicates normal operation. A shortcut menu extension, namespace extension, or drag-and-drop handler can add all menu items.
        /// </summary>
        CMF_NORMAL = 0x00000000,

        /// <summary>
        /// The user is activating the default action, typically by double-clicking. This flag provides a hint for the shortcut menu extension to add nothing if it does not modify the default item in the menu. A shortcut menu extension or drag-and-drop handler should not add any menu items if this value is specified. A namespace extension should at most add only the default item.
        /// </summary>
        CMF_DEFAULTONLY = 0x00000001,

        /// <summary>
        /// The shortcut menu is that of a shortcut file (normally, a .lnk file). Shortcut menu handlers should ignore this value.
        /// </summary>
        CMF_VERBSONLY = 0x00000002,

        /// <summary>
        /// The Windows Explorer tree window is present.
        /// </summary>
        CMF_EXPLORE = 0x00000004,

        /// <summary>
        /// This flag is set for items displayed in the Send To menu. Shortcut menu handlers should ignore this value.
        /// </summary>
        CMF_NOVERBS = 0x00000008,

        /// <summary>
        /// The calling application supports renaming of items. A shortcut menu or drag-and-drop handler should ignore this flag. A namespace extension should add a Rename item to the menu if applicable.
        /// </summary>
        CMF_CANRENAME = 0x00000010,

        /// <summary>
        /// No item in the menu has been set as the default. A drag-and-drop handler should ignore this flag. A namespace extension should not set any of the menu items as the default.
        /// </summary>
        CMF_NODEFAULT = 0x00000020,

        /// <summary>
        /// A static menu is being constructed. Only the browser should use this flag; all other shortcut menu extensions should ignore it.
        /// </summary>
        CMF_INCLUDESTATIC = 0x00000040,

        /// <summary>
        /// The calling application is invoking a shortcut menu on an item in the view (as opposed to the background of the view).
        /// Windows Server 2003 and Windows XP:  This value is not available.
        /// </summary>
        CMF_ITEMMENU = 0x00000080,

        /// <summary>
        /// The calling application wants extended verbs. Normal verbs are displayed when the user right-clicks an object. To display extended verbs, the user must right-click while pressing the Shift key.
        /// </summary>
        CMF_EXTENDEDVERBS = 0x00000100,

        /// <summary>
        /// The calling application intends to invoke verbs that are disabled, such as legacy menus.
        /// Windows Server 2003 and Windows XP:  This value is not available.
        /// </summary>
        CMF_DISABLEDVERBS = 0x00000200,

        /// <summary>
        /// The verb state can be evaluated asynchronously.
        /// Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This value is not available.
        /// </summary>
        CMF_ASYNCVERBSTATE = 0x00000400,

        /// <summary>
        /// Informs context menu handlers that do not support the invocation of a verb through a canonical verb name to bypass IContextMenu::QueryContextMenu in their implementation.
        ///     Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This value is not available.
        /// </summary>
        CMF_OPTIMIZEFORINVOKE = 0x00000800,

        /// <summary>
        /// Populate submenus synchronously.
        ///     Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This value is not available.
        /// </summary>
        CMF_SYNCCASCADEMENU = 0x00001000,

        /// <summary>
        /// When no verb is explicitly specified, do not use a default verb in its place.
        ///     Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This value is not available.
        /// </summary>
        CMF_DONOTPICKDEFAULT = 0x00002000,

        /// <summary>
        /// This flag is a bitmask that specifies all bits that should not be used. This is to be used only as a mask. Do not pass this as a parameter value.
        /// </summary>
        CMF_RESERVED = 0xFFFF0000
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Dave Kerr
Software Developer
United Kingdom United Kingdom
Follow my blog at www.dwmkerr.com and find out about my charity at www.childrenshomesnepal.org.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160208.1 | Last Updated 20 May 2014
Article Copyright 2013 by Dave Kerr
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid