Hi,
I’m posting a message to the SDL window but I don’t know how to peek this
message.
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.
I will be very gratefull if someone could help me.
Thanks in advance
Leire
Maruri Leire escribi?:
Hi,
I’m posting a message to the SDL window but I don’t know how to peek this
message.
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.
-
Activate processing of system-dependant messages using
SDL_EventState(SDL_SysWMEvent, SDL_ENABLE).
That way, the message will be routed through your normal event processing
routine.
-
Set your own event filtering routine using SDL_SetEventFilter(yourfunction)
and, within it, process the message.
This method is a bit harder but funny 
Regards,
Wizord.