Adding the control to a MFC project developed through Visual Studio 2005 or higher |
|
Find below required steps:
• | Open the project you are working on |
• | Open the dialog box that will host the control |
• | Right click the dialog box area and select "Insert ActiveX control..." from the context menu |
• | Within the installed ActiveX components find the component named "Active Waveform Analyzer Control" as displayed below |
• | Pressing the "OK" button will bring you again to your project working area and the representation of the ActiveX control will appear as seen below |
• | After the insertion you can resize and reposition the control by dragging its handles as needed |
• | You can now start developing your code around the control as described inside the How to use the control in your projects section |
Important note about wrappers usage
The use of ActiveX controls within projects developed using Visual C++ 2003 (or higher) and MFC creates particular issues users must be aware of: as seen for Visual C++ 6.0, ActiveX controls require wrapper classes in order to be used in this environment.
Usually these wrapper classes should be generated automatically by the development environment through a dedicated wizard but, due to some unclear policy inside the newer versions of Visual Studio, wrapper classes will result incomplete when dealing with ActiveX controls that, in order to maintain backward compatibility, alternates identifiers of properties and methods. For this reason our control comes with its already generated C++ wrapper classes, installed by the setup package inside the "wrappers\cpp.net" directory (by default the complete path should be "\Program Files\MultiMedia Soft\Active Waveform Analyzer\wrappers\cpp.net").
This issue implies to perform some manual action when creating a variable associated to the control:
ActiveWaveformAnalyzer.cpp and ActiveWaveformAnalyzer.h WaveformScrollerWan.cpp and WaveformScrollerWan.h
#include "ActiveWaveformAnalyzer.h" #include "WaveformScrollerWan.h"
CActiveWaveformAnalyzer m_waveform;
DDX_Control(pDX, IDC_ACTIVEWAVEFORMANCTRL1, m_waveform);
m_waveform.InitWaveformAnalyzer ((long) GetSafeHwnd ()); m_waveform.AboutBox ();
|