Click here to Skip to main content
15,886,643 members
Articles / Desktop Programming / Win32

.NET Shell Extensions - Shell Drop Handlers

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
19 Jan 2013CPOL7 min read 53.9K   2.1K   35  
Rapidly create Shell Drop Handler Extensions using .NET
using System;
using System.Runtime.InteropServices;

namespace SharpShell.Interop
{
    internal delegate bool  AddPropertySheetPageDelegate(IntPtr hPropSheetPage, IntPtr lParam);

    /// <summary>
    /// IShellPropSheetExt
    /// </summary>
    [ComImport]
    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    [Guid("000214e9-0000-0000-c000-000000000046")]
    internal interface IShellPropSheetExt
    {
        [PreserveSig()]
        int AddPages(IntPtr pfnAddPage, IntPtr lParam);

        [PreserveSig()]
        int ReplacePage(uint uPageID, AddPropertySheetPageDelegate lpfnReplacePage, IntPtr lParam);
    }


    public delegate uint PropSheetCallback(IntPtr hwnd, uint uMsg, ref PROPSHEETPAGE ppsp);
	public delegate bool DialogProc(IntPtr hwndDlg, uint uMsg, IntPtr wParam, IntPtr lParam); 
    
    [Flags]
	public enum PSP : uint
	{
		DEFAULT				= 0x00000000,
		DLGINDIRECT			= 0x00000001,
		USEHICON			= 0x00000002,
		USEICONID			= 0x00000004,
		USETITLE			= 0x00000008,
		RTLREADING			= 0x00000010,

		HASHELP				= 0x00000020,
		USEREFPARENT		= 0x00000040,
		USECALLBACK			= 0x00000080,
		PREMATURE			= 0x00000400,

		HIDEHEADER			= 0x00000800,
		USEHEADERTITLE		= 0x00001000,
		USEHEADERSUBTITLE	= 0x00002000
	}
}

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 Code Project Open License (CPOL)


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

Comments and Discussions