Using Investintech PDF Viewer Control in Microsoft Visual C++.NET 2003

In this section you will see how to make wrapper class around Investintech PDF Viewer Control. All pictures and examples from now on will be based on Microsoft Visual C++.NET 2003. Furthermore, we will use Microsoft Foundation Classes (MFC) to create that wrapper class.

Creating New Project and Adding Wrapper Class

Start Visual Studio and select ‘File > New > Project’. In ‘ Project Types’ pane select Visual C++ projects and in ‘ Templates’ pane select MFC Application. Type application name and click ‘OK’.

After that you should see the window titled “MFC Application Wizard”. The most important option to select is ‘ActiveX controls’ under Advanced Features:

After you click the ‘Finish’ button Application Wizard will make all necessary classes and resources. In the ‘Solution Explorer’ pane right click the Source Files folder and select
Add > Add class...’ from context sensitive menu. Select ‘MFC Class From ActiveX Control’ and click the ‘Open’ button. You should see the window like this one:

Choose InvestintechPDFViewerControl Control from ‘Available ActiveX controls’ drop down list. Then click on the ‘ >’ button and on the ‘Finish’ button. You should see two new files in your project: CDInvestintechPDFViewerControl.h and CDInvestintechPDFViewerControl.cpp.

The result of these operations is adding the wrapper class CDInvestintechPDFViewerControl to your project. Now you can create (instantiate) object of CDInvestintechPDFViewerControl type and use Investintech PDF Viewer Control through CDInvestintechPDFViewerControl methods.