十步会用IOCOMP–iplotx控件
1、 新建项目-MFC-基于对话框
2、 插入ActiveX控件-选择iPlotX Control
3、右击该控件,添加变量,输入变量名
4、类向导-(Dlg结尾那个类)添加函数-IplotxInit(用于该控件基本参数设置)
5、在Dlg.cpp中开头处添加以下代码:
#import "iPlotLibrary.tlb" named_guids
#include "atlbase.h"
using namespace iPlotLibrary;
CComPtr<iPlotLibrary::IiPlotX> PlotComponent;
6、在函数IplotxInit()中添加以下代码:
CWnd* pPlotWnd = GetDlgItem(IDC_IPLOTX1);
IUnknown* m_iUnknown;
//Get iDispatch Inteface to Plot Component
m_iUnknown = pPlotWnd->GetControlUnknown();
m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::