Re: [ DirectShow ] How to always show Video Window within a dialog
From: Y.C (YC_at_discussions.microsoft.com)
Date: 12/03/04
- Next message: Mathew: "Re: Inverted Video :: DirectShow Transform Filter :: DVD"
- Previous message: Eric Zhang: "How to set property of MS MPEG2 Demultiplexer filter"
- In reply to: Y.C: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Next in thread: The March Hare [MVP]: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Reply: The March Hare [MVP]: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: Mathew: "Re: Inverted Video :: DirectShow Transform Filter :: DVD"
- Previous message: Eric Zhang: "How to set property of MS MPEG2 Demultiplexer filter"
- In reply to: Y.C: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Next in thread: The March Hare [MVP]: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Reply: The March Hare [MVP]: "Re: [ DirectShow ] How to always show Video Window within a dialog"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|