CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Posts
    6

    Cool 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.

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    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);
    }
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  3. #3
    Join Date
    Dec 2008
    Posts
    114

    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...

  4. #4
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: flash file play (*.swf) in VC

    Quote Originally Posted by carl666 View Post
    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!".
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

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
  •  





Click Here to Expand Forum to Full Width

Featured