Defines the common dialog box hook procedure that is overridden to add specific functionality to a common dialog box.
A zero value if the default dialog box procedure processes the message; a nonzero value if the default dialog box procedure ignores the message.
A hook procedure is a mechanism by which a function can intercept events before they reach an application. When you override the CommonDialog.HookProc(IntPtr, int, IntPtr, IntPtr) method for a System.Windows.Forms.CommonDialog class, the operating system invokes your override of the function to post operating system messages to the window.
By default, the hook procedure centers the dialog box on the screen in response to a WM_INITDIALOG message.
This method uses System.Security.Permissions.SecurityAction.LinkDemand to prevent it from being called from untrusted code; only the immediate caller is required to have System.Security.Permissions.SecurityPermissionAttribute.UnmanagedCode permission. If your code can be called from partially trusted code, do not pass user input to System.Runtime.InteropServices.Marshal class methods without validation. For important limitations on using the LinkDemand member, see [<topic://cpcondemandvslinkdemand>].
This property also uses the System.Security.Permissions.SecurityAction.InheritanceDemand security attribute; to override this member, the derived class must have the CustomPermission permission.