Rediger

Del via


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

Definition

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

protected:
 override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);
protected override IntPtr HookProc (IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);
override this.HookProc : nativeint * int * nativeint * nativeint -> nativeint
Protected Overrides Function HookProc (hWnd As IntPtr, msg As Integer, wparam As IntPtr, lparam As IntPtr) As IntPtr

Parameters

hWnd
IntPtr

nativeint

The handle to the dialog box window.

msg
Int32

The message received by the dialog box.

wparam
IntPtr

nativeint

Additional information about the message.

lparam
IntPtr

nativeint

Additional information about the message.

Returns

IntPtr

nativeint

Returns zero if the default dialog box procedure processes the message; returns a nonzero value if the default dialog box procedure ignores the message.

Remarks

A hook procedure allows the user to connect or insert other routines into a routine or application for the purpose of debugging or enhancing functionality.

By default, the hook procedure centers the dialog box on the screen in response to a WM_INITDIALOG message.

Notes to Inheritors

When overriding HookProc(IntPtr, Int32, IntPtr, IntPtr) in a derived class, be sure to call the base class's HookProc(IntPtr, Int32, IntPtr, IntPtr) method.

Applies to