nanoStream ActiveX Plugin – VisualC++ and MFC
This tutorial shows how easy it is to create a custom Live Encoding and Streaming application with the nanoStream plugins, based on VisualStudio, C++ and MFC.
This tutorial was created with VisualStudio 2008, but should work similar with VS 2010.
Create a new MFC Application Project (File/New Project)
In the following MFC Application Wizard, select “Dialog Based Application”
Select all default values for the rest and Finish
A new project solution is created based on an empty dialog.
Right-click on the dialog and select “Insert ActiveX Control…”
Select “nanoStream RTMPActiveX Class”
Position and resize the control window accordingly.
The window will show a live camera preview later.
Create a class member variable for the control for simpler access:
Now let us create a button to create a camera preview.
From the Toolbox, select “Button” and place the button on the dialog.
Double-Click on the button to edit the new source code event handler:
This is the complete code which shows the camera preview: