"Kai" <Kai@discussions.microsoft.com> ha scritto nel messaggio
news:6F4B9F66-BE0D-4B69-9D7B-65FCBB420BC9@microsoft.com...
Hi! When I use directshow to play a video on a Dialog-based window
application, the video plays well, but if I pause, then move or close and
open the window, the picture doen't move or redraw. I have tried Validate
or
Invalidate or RedrawWindow. They don't help.
I don't know what interface you are using and what explicit code you are
using...
But if you use the IVMRWindowlessControl9 interface, I think that a couple
of its methods (like SetVideoPosition and SetVideoClippingWindow) may be
useful:
IVMRWindowlessControl9 Interface
http://msdn.microsoft.com/en-us/library/dd390537(VS.85).aspx
"The IVMRWindowlessControl9 interface controls how the Video Mixing Renderer
Filter 9 (VMR-9) renders a video stream within a container window."
You could use these methods during initialization something like this:
<code>
// IVMRWindowlessControl9 * pControl;
// HRESULT hr;
....
//
// Set destination rectangle to play the video
//
RECT rcDest = {0};
// ...setup rcDest
hr = pControl->SetVideoPosition( NULL, &rcDest );
....check error...
//
// Set the container window onto where the video will be clipped
//
hr = pControl->SetVideoClippingWindow( hwnd );
....check error...
</code>
(However, as Ajay suggested, probably asking to the /ad hoc/ directshow
newsgroup could give you better help...)
HTH,
Giovanni