locked
How to close the window automatically after the video playback finishes in Microsoft Media Foundation? RRS feed

  • Question

  • I use Invoke() of IMFAsyncCallback to intercept MEEndOfPresentation event but I read on internet that I cant stop a window message pumping loop from another thread and AFAIK IMFAsyncCallback is running in another thread. Can I just PostMessage() from inside the Invoke() method? How I do it to close the window(destroy it) after the playback has ended?
    Monday, July 17, 2017 8:47 PM

All replies

  • i think it works with
    PostMessage(hWnd, WM_CLOSE, 0,0);
    • Proposed as answer by Baron Bi Tuesday, July 18, 2017 2:04 AM
    Monday, July 17, 2017 9:49 PM
  • Hi Moniki,

    thanks for posting here.

    If your case has been solved, please help to mark answer. If you have any other concerns, just feel free to contact us.

    Your understanding and cooperation will be grateful.

    Best Regards,
    Sera Yu


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Friday, July 28, 2017 6:08 AM