CommonDialog.HookProc(IntPtr, Int32, IntPtr, IntPtr) 方法

定义

定义要重写的通用对话框挂钩过程,以便向通用对话框添加特定功能。

protected:
 virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
[System.Security.SecurityCritical]
protected virtual IntPtr HookProc (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
protected virtual IntPtr HookProc (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);
[<System.Security.SecurityCritical>]
abstract member HookProc : nativeint * int * nativeint * nativeint -> nativeint
override this.HookProc : nativeint * int * nativeint * nativeint -> nativeint
abstract member HookProc : nativeint * int * nativeint * nativeint -> nativeint
override this.HookProc : nativeint * int * nativeint * nativeint -> nativeint
Protected Overridable Function HookProc (hwnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr) As IntPtr

参数

hwnd
IntPtr

nativeint

Win32 对话框的窗口句柄。

msg
Int32

Windows由 Win32 对话框处理的消息。

wParam
IntPtr

nativeint

用于对话框操作的参数。

lParam
IntPtr

nativeint

用于对话框操作的参数。

返回

IntPtr

nativeint

始终返回 Zero

属性

注解

HookProc 通过将对话窗口相对于屏幕居中并设置焦点设置为默认控件来处理对话初始化。

适用于