inserting an avi file into the resource file 
Author Message
 inserting an avi file into the resource file

Hi,
        I'm trying to import an avi file into the resources
and then use 'BOOL CAnimateCtrl::Open( UINT nID );' to open it.
It compiles properly but when I run the program it fails to
open the avi.

Can someone help me on this?

    Thanking in advance,
                Jason



Sat, 07 Aug 1999 03:00:00 GMT  
 inserting an avi file into the resource file

You didn't mention if you are building a DLL.



Quote:
> Hi,
>    I'm trying to import an avi file into the resources
> and then use 'BOOL CAnimateCtrl::Open( UINT nID );' to open it.
> It compiles properly but when I run the program it fails to
> open the avi.



Sat, 07 Aug 1999 03:00:00 GMT  
 inserting an avi file into the resource file

Can you post some code to show how you are loading the resource?
--
Ed



Quote:
> Hi,
>    I'm trying to import an avi file into the resources
> and then use 'BOOL CAnimateCtrl::Open( UINT nID );' to open it.
> It compiles properly but when I run the program it fails to
> open the avi.

> Can someone help me on this?

>     Thanking in advance,
>            Jason



Sat, 07 Aug 1999 03:00:00 GMT  
 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



Sun, 08 Aug 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. how do i insert video files to the application (avi for eg)

2. Inserting AVI or GIF Animation as a Resource

3. I seek some AVI file resource.

4. How to load a AVI file form DLL(only resource)

5. Inserting AVI or GIF Animation as a Resource

6. CAnimateCtrl and AVI file as a resource

7. avi: which tool can be used to create AVI file

8. input file is an .avi file

9. File replication and displaying avi file

10. howto: include AVI file into *.exe file

11. howto: include AVI file into *.exe file

12. File replication and displaying avi file

 

 
Powered by phpBB® Forum Software