CommonDialog.HookProc(IntPtr, Int32, IntPtr, IntPtr) Method

Definition

Defines the common dialog box hook procedure that is overridden to add specific functionality to a common dialog box.

C#
[System.Security.SecurityCritical]
protected virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
C#
protected virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);

Parameters

hwnd
IntPtr

Window handle for the Win32 dialog.

msg
Int32

Windows message to be processed by the Win32 dialog.

wParam
IntPtr

Parameters for dialog actions.

lParam
IntPtr

Parameters for dialog actions.

Returns

IntPtr

Always returns Zero.

Attributes

Remarks

HookProc handles dialog initialization by centering the dialog window, relative to the screen, and to set focus to the default control.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10