WINEVENTPROC callback function (winuser.h)
An application-defined callback (or hook) function that the system calls in response to events generated by an accessible object. The hook function processes the event notifications as required. Clients install the hook function and request specific types of event notifications by calling SetWinEventHook.
The WINEVENTPROC type defines a pointer to this callback function. WinEventProc is a placeholder for the application-defined function name.
Syntax
WINEVENTPROC Wineventproc;
void Wineventproc(
HWINEVENTHOOK hWinEventHook,
DWORD event,
HWND hwnd,
LONG idObject,
LONG idChild,
DWORD idEventThread,
DWORD dwmsEventTime
)
{...}
Parameters
hWinEventHook
Type: HWINEVENTHOOK
Handle to an event hook function. This value is returned by SetWinEventHook when the hook function is installed and is specific to each instance of the hook function.
event
Type: DWORD
Specifies the event that occurred. This value is one of the event constants.
hwnd
Type: HWND
Handle to the window that generates the event, or NULL if no window is associated with the event. For example, the mouse pointer is not associated with a window.
idObject
Type: LONG
Identifies the object associated with the event. This is one of the object identifiers or a custom object ID.
idChild
Type: LONG
Identifies whether the event was triggered by an object or a child element of the object. If this value is CHILDID_SELF, the event was triggered by the object; otherwise, this value is the child ID of the element that triggered the event.
idEventThread
dwmsEventTime
Type: DWORD
Specifies the time, in milliseconds, that the event was generated.
Return value
None
Remarks
Within the hook function, the parameters hwnd, idObject, and idChild are used when calling AccessibleObjectFromEvent.
Servers generate events by calling NotifyWinEvent.
Create multiple callback functions to handle different events. For more information, see Registering a Hook Function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Redistributable | Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95 |