public bool PropPageDialogProc(IntPtr windowDialog, UInt32 message, IntPtr wordParameter, IntPtr longParameter) { if (this.windowUnmanagedParent == IntPtr.Zero) { this.windowUnmanagedParent = windowDialog; } switch (message) { case WM.INITDIALOG: try { #pragma warning suppress 56523 IntPtr parent = SafeNativeMethods.GetParent(windowUnmanagedParent); wsatControl = new WsatControl(windowUnmanagedParent, parent, this); if (Utilities.OSMajor > 5) { wsatControl.Size = new System.Drawing.Size(425, wsatControl.Size.Height); } #pragma warning suppress 56523 SafeNativeMethods.SetParent(wsatControl.Handle, this.windowUnmanagedParent); activeItem.Add(propSheet); } catch (WsatAdminException ex) { ShowErrorDialog(ex.Message); return(false); } return(true); case WM.DESTROY: return(true); case WM.NOTIFY: return(HandleNotification(longParameter)); case WM.SHOWWINDOW: OnShowPropertyPage(wordParameter != IntPtr.Zero); return(true); default: return(false); } }
public bool PropPageDialogProc(IntPtr windowDialog, UInt32 message, IntPtr wordParameter, IntPtr longParameter) { if (this.windowUnmanagedParent == IntPtr.Zero) { this.windowUnmanagedParent = windowDialog; } switch (message) { case WM.INITDIALOG: try { #pragma warning suppress 56523 IntPtr parent = SafeNativeMethods.GetParent(windowUnmanagedParent); wsatControl = new WsatControl(windowUnmanagedParent, parent, this); if (Utilities.OSMajor > 5) { wsatControl.Size = new System.Drawing.Size(425, wsatControl.Size.Height); } #pragma warning suppress 56523 SafeNativeMethods.SetParent(wsatControl.Handle, this.windowUnmanagedParent); activeItem.Add(propSheet); } catch (WsatAdminException ex) { ShowErrorDialog(ex.Message); return false; } return true; case WM.DESTROY: return true; case WM.NOTIFY: return HandleNotification(longParameter); case WM.SHOWWINDOW: OnShowPropertyPage(wordParameter != IntPtr.Zero); return true; default: return false; } }