Previously, I wrote a blog post about playing SWF files in .NET (http://www.bk41.com/blog/read.php?418). Now, I will continue with another blog post about playing SWF files in MFC. This functionality is mainly achieved by relying on a resource downloaded from the CSDN resource library, and so far, I haven't utilized its event handling yet.
First, add a class. Then, in the class where you need to play the SWF file, add an object.
In the design view (resource view) of this dialog box, add an ActiveX control (the Shockwave Object control), and then place the following code in the initialization code of this dialog box to achieve the playback of the Flash file.
Of course, if you want the generated EXE to run anywhere, it involves the registration of DLLs (you can refer to this article for registration issues: http://www.bk41.com/blog/read.php?413), and you must set the project properties to the option of "using static MFC class libraries."