Exemple #1
0
        /// <summary>
        /// Add property page for this object
        /// </summary>
        /// <param name="lpfnAddPage"></param>
        /// <param name="lParam"></param>
        /// <returns></returns>
        int IShellPropSheetExt.AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, IntPtr lParam)
        {
            try
            {
                // ADD PAGES HERE
                PropertySheetControl samplePage;
                PROPSHEETPAGE        psp;
                IntPtr hPage;

                // In ActiveDirectory extensions, Get type of object, and show page according to class
                // GetADPath();
                // if(sClass.ToLower() == "organizationalunit") {...}


                // create new inherited property page(s) and pass dobj to it
                samplePage = new DescriptionControl();
                psp        = samplePage.GetPSP(250, 230);



                hPage = Comctl32.CreatePropertySheetPage(ref psp);
                bool result = pfnAddPage(hPage, lParam);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            return(0);
        }