-
June 19th, 2009, 05:03 AM
#1
flash file play (*.swf) in VC
Hi,
I'd like to know Is it possible to play flash file (.swf) with VC?
if so, Could someone tell me.. some example code to play flash file?
Thanks.
-
June 19th, 2009, 08:13 AM
#2
Re: flash file play (*.swf) in VC
Yes, it's possible and is very easy.
First, take a look at this FAQ: How to make a simple text editor?.
To make an HTML viewer (which can play swf files as well) instead of a text editor, we have to do the same steps except that we'll replace CEditView with CHtmlView as base class for our view.
That's almost all. To play the flash file we can further call CHtmlView::Navigate2 like in the following example
Code:
void CMyDerivedHtmlView::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate();
Navigate2(_T("c:\\temp\\test.swf"), NULL, NULL);
}
-
June 19th, 2009, 09:32 AM
#3
Re: flash file play (*.swf) in VC
You don't need any HTML viewer (!)
Simply use Flash OCX embedded inside a native Win32 app (with Host OCX control for example)
~10 lines of code in pure C/Win32...
-
June 19th, 2009, 11:28 AM
#4
Re: flash file play (*.swf) in VC
Originally Posted by carl666
You don't need any HTML viewer (!)
Simply use Flash OCX embedded inside a native Win32 app (with Host OCX control for example)
~10 lines of code in pure C/Win32...
Absolutely right!
Next is: "please! 10 lines of codes, pleaaaaaseee!".
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|