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.
Printable View
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.
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);
}
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...