Re: [ DirectShow ] How to always show Video Window within a dialog

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Y.C (YC_at_discussions.microsoft.com)
Date: 12/03/04


Date: Thu, 2 Dec 2004 18:43:03 -0800

I'm really sorry to change the problem so frequently.
Funcstions called in WM_PAINT and WM_ERASEBKGND message handlers:
                HRESULT hr;
                // m_pVidWin is a valid IVideoWIndow Interface pointer
        hr |= m_pVidWin->put_Owner((OAHWND)(hVideoScreen));
        hr |= m_pVidWin->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS);
                ASSERT( hr == S_OK );
  Calling these functions in WM_PAINT and WM_ERASEBKGND message handlers
would not work well. The problem is not the "gray region" shown in the
window. When I suddenly move the window while the video being paused, the
video window seemed could not "catch up with" the sudden move, and some
region in the position of the picture control become "black".
________
| | |
|___| |
| <|-- Region of black screen
|______ |

  Therefore, I called these two functions in WM_MOVE message handler. It
worked normally, but would twinkle slightly. Are there any better solution?
To always put owner of the video window to the picture control and set window
style seem to be strange.
  In addition, open the other video using the windows media player before
running my program, even if the WM_MOVE message handler didn't call
put_Owner() and put_WindowStyle(), it still work well while without
twinkling. So, is there any better solution? Other functions or other
video-rendering filter? I'd appreciate your help!



Relevant Pages

  • Re: How to insert an event to win32 app?
    ... If you are using an older Visual Studio Version, there is a class wizad, ... that can be used to add message handlers. ... select the class in the class view and in the properties window you can ...
    (microsoft.public.vc.language)
  • Re: How to insert an event to win32 app?
    ... If you are using an older Visual Studio Version, there is a class wizad, ... that can be used to add message handlers. ... select the class in the class view and in the properties window you can ...
    (microsoft.public.vc.language)
  • Re: Easy one: Communication in MDI
    ... Both posting and sending messages should work. ... Check so that the message handlers are correctly declared. ... > with calls to the individual functions within the main window to handle ...
    (microsoft.public.vc.mfc)
  • Re: Minimize to the Tray.
    ... > Use the Shell_NotifyIcon API to create a tray icon and hide your ... > Add the appropriate message handlers to your window procedure to manage ... > messages from the API. ...
    (microsoft.public.win32.programmer.ui)
  • Re: ATI HDTV Wonder Problem
    ... > tuner card in the system for my satellite STB through the S-video ... > for all of my channels. ... > Center main screen and would have the small video window in the lower ...
    (microsoft.public.windows.mediacenter)