钩子(HOOK)函数教程(三十一)

时间:2010年04月21日 点击:1120

结构9MSLLHOOKSTRUCT Structure

The MSLLHOOKSTRUCT structure contains information about a low-level keyboard input event. msdn错误)

MSLLHOOKSTRUCT结构包含有低层键盘输入事件的信息。

Syntax语法

typedef struct {
    POINT pt;
    DWORD mouseData;
    DWORD flags;
    DWORD time;
    ULONG_PTR dwExtraInfo;
} MSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;

Members成员

pt Specifies a POINT structure that contains the x- and y-coordinates of the cursor, in screen coordinates. 指定在屏幕坐标系下,包含有光标xy坐标的POINT结构。

mouseData

If the message is WM_MOUSEWHEEL, the HIWORD of this member is the wheel delta. The LOWORD is undefined and reserved. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as WHEEL_DELTA, which is 120.

如果消息是WM_MOUSEWHEEL,该成员的HIWORD就是wheel deltaLOWORD做为保留未定义。正值表示滚轮向前旋转,即远离用户的方向;负值表示滚轮向后旋转,即朝向用户的方向。滚轮的点击被定义为WHEEL_DELTA, 具体值为120

If the message is WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK, WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, or WM_NCXBUTTONDBLCLK, the HIWORD of mouseData specifies which X button was pressed or released, and the LOWORD is undefined and reserved. This member can be one or more of the following values. Otherwise, mouseData is not used.

如果消息是WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK, WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, 或者 WM_NCXBUTTONDBLCLK,  mouseData  HIWORD值指定哪个X键被按下或者释放,LOWORD做为保留未定义。该成员可以是以下值中的一个或者多个。否则,mouseData未使用。

1XBUTTON1The first X button was pressed or released. 第一个X键被按下或者释放。

2XBUTTON2 The second X button was pressed or released.第二个X键被按下或者释放。

flags

Specifies the event-injected flag. An application can use the following value to test the mouse flags. 指定事件注入标志。应用程序可以使用下列值来测试鼠标标志。

Value

Purpose

LLMHF_INJECTED

Test the event-injected flag.测试事件注入标志。

0

Specifies whether the event was injected. The value is 1 if the event was injected; otherwise, it is 0. 事件是否被注入。如果被注入,为 1,否则为0

1-15 Reserved.保留

time

Specifies the time stamp for this message. 消息的时间戳。

dwExtraInfo

Specifies extra information associated with the message. 消息的扩展信息。

Helios  2007-5-31

赞助商链接

热门内容

相关内容

联系我们

联系方式