
inserting an avi file into the resource file
The code I use to show my AVI is similar to yours, but I included it in
the resource manually. I edited the <project_name>.rc2 in the res
directory and inserted "IDR_AVI_TEST AVI res\test.avi".
Even though the .rc2 file is located in the RES directory, I still
needed to include the relative path to the avi file as "res\test.avi".
Using a CAnimateCtrl.Open(IDR_AVI_TEST) then worked for me.
I don't know that I see how this is that different from the way you
included it in your resource file.
Hope this helps.
Steve Lewis
Quote:
> Hi,
> Well I'm putting the AVI file in using 'Insert Resource', 'Import...'
> and I choose the Avi file and create 'Movie' as a new resource type.
> Then in my code I have the following:
> public:
> CAnimateCtrl m_cAnimation;
> .
> .
> .
> .
> void ConnectivityTestView::OnInitialUpdate()
> {
> CFormView::OnInitialUpdate();
> if (!m_cAnimation.Open(IDR_PROGRESS_ANIMATION))
> //if (!m_cAnimation.Open("progress.avi"))
> {
> AfxMessageBox("Failed to open animation file");
> }
> CString title;
> title.LoadString(STR_CONNECTIVITY_TEST_VIEW_TITLE);
> SetWindowText(title);
> GetParentFrame()->RecalcLayout();
> ResizeParentToFit(FALSE);
> UpdateWindow();
> }
> When I used the filename it loaded and ran but when I use the resource
> nID It failes, Therefore I figure the problem is when I insert the Avi
> file into the Resource.
> Can you help?
> Thanx
> Jason