flash file play (*.swf) in VC
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

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

  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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,019

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,019

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center