public override IntPtr CreatePageHandle()
        {
            if (_pageHandle != IntPtr.Zero)
            {
                return(_pageHandle);
            }

            PropSheetPageW psp = new PropSheetPageW();

            // *Must* be 260x260. See PhAddPropPageLayoutItem in procprp.c.
            _dialogTemplate = CreateDialogTemplate(260, 260, this.Text, 8, "MS Shell Dlg");

            psp.dwSize  = PropSheetPageW.SizeOf;
            psp.dwFlags = PropSheetPageFlags.UseCallback | PropSheetPageFlags.DlgIndirect | PropSheetPageFlags.UseTitle | PropSheetPageFlags.DlgIndirect;

            psp.pszTitle = Marshal.StringToHGlobalUni("Details");

            psp.pResource = _dialogTemplate;

            psp.pfnDlgProc  = Marshal.GetFunctionPointerForDelegate(_dialogProc);
            psp.pfnCallback = Marshal.GetFunctionPointerForDelegate(_pagePageProc);

            _pageHandle = Win32.CreatePropertySheetPageW(ref psp);

            return(_pageHandle);
        }
        public override IntPtr CreatePageHandle()
        {
            if (_pageHandle != IntPtr.Zero)
                return _pageHandle;

            PropSheetPageW psp = new PropSheetPageW();

            // *Must* be 260x260. See PhAddPropPageLayoutItem in procprp.c.
            _dialogTemplate = CreateDialogTemplate(260, 260, this.Text, 8, "MS Shell Dlg");

            psp.dwSize = PropSheetPageW.SizeOf;
            psp.dwFlags = PropSheetPageFlags.UseCallback | PropSheetPageFlags.DlgIndirect;

            psp.pResource = _dialogTemplate;

            psp.pfnDlgProc = Marshal.GetFunctionPointerForDelegate(_dialogProc);
            psp.pfnCallback = Marshal.GetFunctionPointerForDelegate(_pagePageProc);

            _pageHandle = NativeApi.CreatePropertySheetPageW(ref psp);

            return _pageHandle;
        }
Ejemplo n.º 3
0
 public static extern IntPtr CreatePropertySheetPageW(
     ref PropSheetPageW lppsp
     );
Ejemplo n.º 4
0
 public static extern IntPtr CreatePropertySheetPageW(
     ref PropSheetPageW lppsp
     );