Can't play the avi file by using video control

Hi all,

I am newbie in the directshow and atl using, so I've created the project in the VC2005 as described in the following article:http://msdn2.microsoft.com/en-gb/library/ms787848.aspx.

Then I added event handler to the CMyControl class like this

void__stdcall CMyControl::DblClickMsvidctl1(){

CComPtr<IMSVidCtl> pVidControl;

CComVariant var(OLESTR("C:\\skiing.avi"));

GetDlgControl(IDC_MSVIDCTL1,__uuidof(IMSVidCtl),

reinterpret_cast<void **>(&pVidControl));

HRESULT hr = pVidControl->View(&var);

}

hr returns S_OK, but avi doesn't play. Please point me where I am wrong?

[1205 byte] By [Losqut] at [2007-12-30]
# 1

It's usually a good idea to read at least some of the documentation.

If you read the Remarks section of the IMSVidCtl::View documentation it should be abundently clear what the last 2 missing steps are.

ChrisP. at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 2
Thanks Chris, now all works fine.
Losqut at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...
# 3

Great.

Remember to mark the question as answered when using the forums.

ChrisP. at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,DirectShow Development...

Software Development for Windows Vista

Site Classified