

PVidWin->SetWindowPosition(0, 0, rc.right, rc.bottom)
MYST 3 WINDOWED MODE CODE
For example, the following code stretches the video window to fit the entire client area of the parent window: RECT rc This method takes a rectangle that specifies the left edge, top edge, width, and height of the video window. To set the position of the video relative to the application window's client area, call the IVideoWindow::SetWindowPosition method. The WS_CHILD flag sets the window to be a child window, and the WS_CLIPSIBLINGS flag prevents the window from drawing inside the client area of another child window. This method takes a variable of type OAHWND, so cast the handle to this type: pVidWin->put_Owner((OAHWND)hwnd) Ĭhange the style of the video window by calling the IVideoWindow::put_WindowStyle method: pVidWin->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS) To set the parent window, call the IVideoWindow::put_Owner method with a handle to your application window. PGraph->QueryInterface(IID_IVideoWindow, (void **)&pVidWin) Notify the video window of WM_MOVE messages.īefore starting playback, query the Filter Graph Manager for the IVideoWindow interface: IVideoWindow *pVidWin = NULL.Position the video window inside the owner window.Most of the time, however, you will attach the video window to an application window, so that the video is integrated into your application UI.

Unless you specify otherwise, this window is a top-level window with its own borders and title bar. In windowed mode, the video renderer creates its own window where it paints the video frames. The VMR-7 and VMR-9 filters use windowed mode by default, but also support windowless mode. The legacy Video Renderer Filter always uses windowed mode.
