Player Mfc Application

The MFC starter application includes C source (.cpp) files, resource (.rc) files, header (.h) files, and a project (.vcxproj) file. The code that is generated in these starter files is based on MFC. Let's see, there are programs like 'Pictures to EXE' that takes several photos and manufactures video files (a presentation with background music) in various output formats, one of them the EXE format. Media Player This is a simple media player which plays all audio and video formats.I am updating it becouse there were many of many complaints about it. Actually i had not time to do it, now found some,so updating it.

  1. Selfplayer Mfc Application
  2. Video Player Mfc Application Download
  3. Changeicon Mfc Application

Click OK to start MFC Application Wizard:

Select Dialog based project type and click Next. Next page will appear:

Click Finish to create new project. Visual C++ IDE will display summary information for new project:

Click OK to open new dialog based project in VC++ IDE:

Now we should import Shockwave ActiveX control to controls toolbar. Go to Project menu, select Add To Project sub-menu and then click Components and Controls… command:

Selfplayer mfc application

Visual C++ will display “Components and Controls Gallery” dialog:

Mfc application form

Click on “Registered ActiveX Controls” to display list of available ActiveX controls:

Find and select Shockwave Flash Object ActiveX control in the list of available controls and click “Insert” to add this control to controls toolbar.

VC will generate special C++ class that will help to interact with this control:

Click OK and VC will generate new “CShockwaveFlash” class in ShockwaveFlash.cpp and ShockwaveFlash.h files.

“Shockwave Flash Object” control will appear on controls toolbar:

Selfplayer Mfc Application

Click on “Shockwave Flash Object” icon and then click on dialog form. Answer “OK” to add new component to dialog:

New control will be added as shown below :

Now we will add dialog class member that will handle Flash control. Right-click on dialog and select “Class Wizard” to invoke Class Wizard:

Class Wizard dialog will appear. Select Member Variables tab and click Add Variable… button to add new variable:

Enter name of new varaible: m_FlashPlayer and click OK:

New click OK to close MFC ClassWizard:

Now we will place code that will load “Shapes.swf” into flash player control.

Right-click on dialog form and select “Events..” to invoke Events dialog:

Select and double-click on WM_INITDIALOG caption as shown on screenshot below:

Code Editor window will appear. CDisplayFlashDlg::OnInitDialog() function is responsible for handling initialization code so we will add our code here.

Mfc

Add this line :

Form

m_FlashPlayer.SetMovie(“c:shapes.swf”);

as shown on screenshot below:

And run application by pressing F5 or using Build menu:

Video Player Mfc Application Download

You will see application that will display Shapes.SWF flash movie using Shockwave Flash Object ActiveX control:

Changeicon Mfc Application

You can download the source code of this example here: vc_how_to_display_flash.zip