private IntPtr CreatePropertySheetPage() { if (hPropertySheetPage == IntPtr.Zero) { _psp = new PROPSHEETPAGE(); _psp.hInstance = IntPtr.Zero; _psp.dwSize = Marshal.SizeOf(_psp); _psp.dwFlags = pspFlags.PSP_USECALLBACK | pspFlags.PSP_USETITLE | pspFlags.PSP_DLGINDIRECT; _psp.lParam = IntPtr.Zero; if (RightToLeft == RightToLeft.Yes) { _psp.dwFlags |= pspFlags.PSP_RTLREADING; } if (_icon != null) { _psp.dwFlags |= pspFlags.PSP_USEHICON; _psp.hIcon = _icon.GetHicon(); } if (_showHelpButton) { _psp.dwFlags |= pspFlags.PSP_HASHELP; } _psp.pResource = GetDlgTemplate(); _psp.pfnDlgProc = new DialogProc(WndProc); _psp.pfnCallback = new PropSheetPageProc(PropSheetPageCallback); _psp.pszTitle = Text; hPropertySheetPage = Comctl32.CreatePropertySheetPage(ref _psp); if (hPropertySheetPage != IntPtr.Zero) { _extensionReferences.Add(this); } } return(hPropertySheetPage); }
public static extern IntPtr CreatePropertySheetPage(ref PROPSHEETPAGE psp);
private int PropSheetPageCallback(IntPtr x96e7d32425e52ebf, x879758f4cab61ddd x5bf2804bd1654533, ref PROPSHEETPAGE xa65184d44a47025b) { if ((x5bf2804bd1654533 != x879758f4cab61ddd.xf22ca9d72ffb7392) && (x5bf2804bd1654533 == x879758f4cab61ddd.xae1bd93d002e5fd5)) { _extensionReferences.Remove(this); Marshal.FreeCoTaskMem(_psp.pResource); if (_icon != null) { _icon.Dispose(); _icon = null; } base.Dispose(); GC.SuppressFinalize(this); } return(1); }