网站首页  词典首页

请输入您要查询的函数:

 

术语 messageproc
释义 MessageProc
语法:
LRESULT CALLBACK MessageProc( int code,
WPARAM wParam,
LPARAM lParam
);
MessageProc功能
该MessageProc挂钩过程是一个应用程序定义或库定义的回调函数中调用SetWindowsHookEx函数使用。该系统要求输入事件后,这一职能发生在一个对话框,消息框,菜单或滚动条,但在此之前的输入事件所产生的信息处理。钩子程序可以监视一个对话框消息,消息框,菜单或滚动条由特定的应用程序或所有应用程序创建的。
在HOOKPROC类型定义一个指向这个回调函数。 MessageProc是一个应用程序的占位符定义或库定义的函数的名称。
参数
代码
[in]指定输入事件类型,产生的消息。如果代码小于零,钩子程序必须通过信息,CallNextHookEx函数没有进一步的处理和归还CallNextHookEx返回的值。此参数可以是下列值之一。
MSGF_DDEMGR
输入事件发生时的动态数据交换管理库(DDEML的)是一个等待同步完成交易。欲了解更多有关DDEML的信息,请参见动态数据交换管理库。
MSGF_DIALOGBOX
输入事件发生在一个消息框或对话框。
MSGF_MENU
输入事件发生在一个菜单。
MSGF_SCROLLBAR
输入事件发生在一个滚动条。
wParam
此参数没有使用。
lparam的
[in]指向一个MSG结构。
返回值
如果代码小于零,钩子程序必须归还CallNextHookEx返回的值。
如果代码是大于或等于零,而挂钩程序并不处理消息,强烈建议您调用CallNextHookEx并返回返回值,否则,已经安装WH_MSGFILTER挂钩的其他应用程序将不会收到通知和钩可能行为不正确结果。如果挂钩过程处理的消息,则可能会返回一个非零值,以防止信息传递给钩子链或其他目标窗口程序的系统。
备注
安装的应用程序通过指定WH_MSGFILTER挂钩类型和在调用指针挂钩过程的SetWindowsHookEx函数钩子程序。
如果应用程序使用DDEML和执行过程中,必须同步交易之前,派出的消息,它必须使用WH_MSGFILTER挂钩。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
参见
钩概述,CallNextHookEx,钩子,味精
==英文原文==MessageProc Function
The MessageProc hook procedure is an application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function after an input event occurs in a dialog box, message box, menu, or scroll bar, but before the message generated by the input event is processed. The hook procedure can monitor messages for a dialog box, message box, menu, or scroll bar created by a particular application or all applications.
The HOOKPROC type defines a pointer to this callback function. MessageProc is a placeholder for the application-defined or library-defined function name.
Syntax
LRESULT CALLBACK MessageProc( int code,
WPARAM wParam,
LPARAM lParam
);
Parameters
code
[in] Specifies the type of input event that generated the message. If code is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and return the value returned by CallNextHookEx. This parameter can be one of the following values.
MSGF_DDEMGR
The input event occurred while the Dynamic Data Exchange Management Library (DDEML) was waiting for a synchronous transaction to finish. For more information about DDEML, see Dynamic Data Exchange Management Library .
MSGF_DIALOGBOX
The input event occurred in a message box or dialog box.
MSGF_MENU
The input event occurred in a menu.
MSGF_SCROLLBAR
The input event occurred in a scroll bar.
wParam
This parameter is not used.
lParam
[in] Pointer to an MSG structure.
Return Value
If code is less than zero, the hook procedure must return the value returned by CallNextHookEx.
If code is greater than or equal to zero, and the hook procedure did not process the message, it is highly recommended that you call CallNextHookEx and return the value it returns; otherwise, other applications that have installed WH_MSGFILTER hooks will not receive hook notifications and may behave incorrectly as a result. If the hook procedure processed the message, it may return a nonzero value to prevent the system from passing the message to the rest of the hook chain or the target window procedure.
Remarks
An application installs the hook procedure by specifying the WH_MSGFILTER hook type and a pointer to the hook procedure in a call to the SetWindowsHookEx function.
If an application that uses the DDEML and performs synchronous transactions must process messages before they are dispatched, it must use the WH_MSGFILTER hook.
Function Information
HeaderDeclared in Winuser.h, include Windows.h
Import libraryNone
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Hooks Overview , CallNextHookEx , SetWindowsHookEx , MSG
==原始网址==http://msdn.microsoft.com/en-us/library/ms644987(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 9:22:26