11.2. Using Morovia ActiveX Controls with MSVC++

To use Morovia Barcode ActiveX with Visual C++, you need to make a project that uses MFC with ActiveX support. The easiest way to do this is to use the MFC AppWizard (exe).

Make sure that support for ActiveX controls is enabled (it should be enabled by default). Then you will be able to add ActiveX controls to the dialog and make member variables for them using ClassWizard (see below for more details).

This example assumes you are creating the ActiveX Control in a dialog box.

Right-click on the dialog box and select Insert ActiveX Control from the menu.

Figure 11.1. Insert control into a MFC dialog

Insert control into a MFC dialog

From the list that appears, choose Morovia Barcode ActiveX to include. It displays an area of barcode image. Change the symbology to the one you are working with, and other properties.

11.2.1. Add Member Variable in Class Wizard

The ActiveX Control will appear in the Member Variables tab in the Class Wizard. When you add a variable for the control, MSVC creates a Class wrapper for the control.