NotifyWinEvent function (winuser.h)
Signals the system that a predefined event occurred. If any client applications have registered a hook function for the event, the system calls the client's hook function.
void NotifyWinEvent( DWORD event, HWND hwnd, LONG idObject, LONG idChild );
Specifies the event that occurred. This value must be one of the event constants.
Handle to the window that contains the object that generated the event.
Identifies the object that generated the event. This value is either one of the predefined object identifiers or a custom object ID value.
Identifies whether the event was generated by an object or by a child element of the object. If this value is CHILDID_SELF, the event was generated by the object itself. If not CHILDID_SELF, this value is the child ID of the element that generated the event.
Servers call this function to notify the system that an event has occurred. Microsoft Active Accessibility checks to see if any client applications have set hook procedures for the event and, if so, calls the appropriate hook procedures.
If no hook procedures are registered for the event, the performance penalty for calling this function is minor.
Servers call NotifyWinEvent to announce the event to the system after the event has occurred; they must never notify the system of an event before the event has occurred.
When the client's hook procedure is called, it receives a number of parameters that describe the event and the object that generated the event. The hook procedure uses the AccessibleObjectFromEvent function to retrieve a pointer to the IAccessible interface of the object that generated the event.
Note to Server Developers: When you call NotifyWinEvent, if any clients are listening for that event in-context, their event handlers, which typically send WM_GETOBJECT and call IAccessible methods, will execute before NotifyWinEvent returns. When you call NotifyWinEvent, you should be prepared to handle these calls, if they occur. If you need to do extra setup to allow for this, you should do so before you call NotifyWinEvent, not after.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||winuser.h (include Windows.h)|
|Redistributable||Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95|
|API set||ext-ms-win-ntuser-server-l1-1-0 (introduced in Windows 8)|