[SDL] How to peek a message posted to the SDL window
José Luis Sánchez
wizord at mi.madritel.es
Fri Sep 13 03:07:01 PDT 2002
Maruri Leire <LMaruri at ikerlan.es> escribió:
> I'm posting a message to the SDL window but I don't know how to peek this
> hr = pME->SetNotifyWindow((OAHWND)m_hWnd, WM_GRAPHNOTIFY, 0);
> This function belongs to a DirectShow interface, it posts
> WM_GRAPHNOTIFY messages to the m_hWnd (which is a SDL window handle
> obtained with the SDL_GetWMInfo function).
> WM_GRAPHNOTIFY (= WM_APP+1) is the only event the system will
> handle. I need a way to periodically (not forever) check if this message is
> in the queue.
You could use one of two ways to achieve this.
1. Activate processing of system-dependant messages using
That way, the message will be routed through your normal event processing
2. Set your own event filtering routine using SDL_SetEventFilter(yourfunction)
and, within it, process the message.
This method is a bit harder but funny :-)
More information about the SDL