|Microsoft DirectX 9.0|
The SetNotifyWindow method registers a window to process event notifications.
HRESULT SetNotifyWindow( OAHWND hwnd, long lMsg, long lInstanceData );
[in] Handle to the window, or NULL to stop receiving event messages.
[in] Window message to be passed as the notification.
[in] Value to be passed as the lParam parameter for the lMsg message.
Returns S_OK if successful or E_INVALIDARG if the hwnd parameter is not a valid handle to a window.
This method designates a window that will process event notifications. Whenever the Filter Graph Manager puts an event in the event queue, it will also post a message to the designated window. The hwnd parameter specifies the window, and the lMsg parameter specifies the message. The application should define a private window message for this purpose. The message's lParam parameter is set to the value of lInstanceData, and the wParam parameter is set to zero.
When the window receives the message, it should call the IMediaEvent::GetEvent method to retrieve the event. Events are asynchronous, so the queue might contain several events (or none). Call GetEvent repeatedly, until it returns an error code.