NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CommonDialog.HookProc

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

[Visual Basic]
Overridable Protected Function HookProc( _
   ByVal hWnd As Integer, _
   ByVal msg As Integer, _
   ByVal wParam As Integer, _
   ByVal lParam As Integer _
) As Integer
[C#]
protected virtual int HookProc(
   int hWnd,
   int msg,
   int wParam,
   int lParam
);
[C++]
protected: virtual int HookProc(
   int hWnd,
   int msg,
   int wParam,
   int lParam
);
[JScript]
protected function HookProc(
   hWnd : int,
   msg : int,
   wParam : int,
   lParam : int
) : int;

Parameters

hWnd
The handle to the dialog box window.
msg
The message being received.
wParam
Additional information about the message.
lParam
Additional information about the message.

Return Value

A zero value if the default dialog box procedure processes the message; 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 on the screen in response to a WM_INITDIALOG message.

Notes to Inheritors: Inheriting classes can override this method to add specific functionality to a common dialog.

See Also

CommonDialog Class | CommonDialog Members | System.WinForms Namespace