WM_MOUSEHOVER Notification

The WM_MOUSEHOVER message is posted to a window when the cursor hovers over the client area of the window for the period of time specified in a prior call to TrackMouseEvent.

A window receives this message through its WindowProc function.

Syntax

WM_MOUSEHOVER

    WPARAM wParam
    LPARAM lParam;
    

Parameters

wParam
Indicates whether various virtual keys are down. This parameter can be one or more of the following values.
MK_CONTROL
The CTRL key is depressed.
MK_LBUTTON
The left mouse button is depressed.
MK_MBUTTON
The middle mouse button is depressed.
MK_RBUTTON
The right mouse button is depressed.
MK_SHIFT
The SHIFT key is depressed.
MK_XBUTTON1
Windows 2000/XP: The first X button is down.
MK_XBUTTON2
Windows 2000/XP: The second X button is down.
lParam
The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.

The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.

Return Value

If an application processes this message, it should return zero.

Remarks

Hover tracking stops when WM_MOUSEHOVER is generated. The application must call TrackMouseEvent again if it requires further tracking of mouse hover behavior.

Use the following code to obtain the horizontal and vertical position:

xPos = GET_X_LPARAM(lParam); 
yPos = GET_Y_LPARAM(lParam); 

You can also use the MAKEPOINTS macro to convert the lParam parameter to a POINTS structure.

Notification Requirements

Minimum DLL Version None
HeaderDeclared in Winuser.h, include Windows.h
Minimum operating systems Windows 98, Windows NT 4.0

See Also

Tags :


Community Content

Đonny
Value
WM_MOUSEHOVER = &H2A1
MK_CONTROL = &H8
MK_LBUTTON = &H1
MK_MBUTTON = &H10
MK_RBUTTON = &H2
MK_SHIFT = &H4
MK_XBUTTON1 = &H20
MK_XBUTTON2 = &H40
Tags : value constant

Page view tracker