VC怎么调用ActiveX

对bartend进行二次开发,提供了activeX的开发方式。但是在VS2010的Insert ActiveX control里找不到bartend的模块,下面的文档是用C#,VB调用activeX的方法,请问VC有没有类似的方法?

Getting Started with ActiveX Automation 

BarTender's ActiveX Automation interface allows you to integrate BarTender's label printing functions inside of other Windows applications. You have access to most of BarTender's data retrieval, prompting, and label printing functionality using a programming interface, allowing you to quickly modify and print labels without interacting with BarTender's main user interface. 


 Using ActiveX Automation with BarTender requires the Automation Edition of BarTender or better.
 

The instructions below will walk you through the steps to create a Visual Studio project that will use the BarTender ActiveX API (Application Programming Interface).

To specify a project type in Visual Studio 2005 or higher

From the File menu, select New and click Project. 

In the Project types panel, under either the Visual C# or the Visual Basic node, select Windows. 

In the Templates panel, select Windows Application. 

Name the project and click OK. 

To reference the BarTender API

Open the Project menu, and select Add Reference. 

Click on the COM tab. 

Scroll down and click on the BarTender reference so that it is highlighted. 

Click OK. 

This tells the programming interface where to look for the BarTender API. In addition, you can now access all of the objects, methods, and properties found in the BarTender API.

Once your application is created, you are ready to begin programming using ActiveX Automation.

在64位Windows下:
64位exe和dll在目录c:\windows\system32目录下;
32位exe和dll在目录c:\windows\syswow64目录下;
所以要注意:
    在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。
    且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll
    在win64位系统下设置32位程序使用的数据库别名要用c:\windows\syswow64\cliconfg.exe
    在win64位系统下设置32位程序使用的系统DSN要用c:\windows\syswow64\odbcad32.exe
64 位 Windows 平台注意点之文件系统重定向 

zlnfg.cn
hlcnf.cn
rmwkz.cn
fcnpj.cn
tdtzq.cn
ppckj.cn
fqbhw.cn
dfntt.cn
yjkrj.cn
plmtq.cn
pjzlp.cn
qgtzz.cn
ywtdn.cn
xrldc.cn
mslff.cn
dxmkn.cn
tltrm.cn
jdwrr.cn
bmpzq.cn
sgrry.cn
zqznj.cn
hrzln.cn
dfqcr.cn
dqgjc.cn
rykpp.cn
gnnjs.cn
rpzxn.cn
lwmqg.cn
pqxfm.cn
plwcz.cn
blssk.cn
jpknx.cn
fqyzn.cn
wnwrt.cn
mcngd.cn
rtbbp.cn
wqpws.cn
qnmxy.cn
qmyzr.cn
zxpzl.cn
dbwsr.cn
ggmxq.cn
nlkfl.cn
npslh.cn
hlkds.cn
lqsrj.cn
xklkk.cn
rgqyn.cn

vs里面在资源编辑视图中窗口空白处,右键->Insert ActiveX Control...,在弹出的对话框中选择你电脑上注册的ActiveX控件,如果没注册的话是找不到的。
找到了之后选择OK就好了,这个要看这个控件有没有提高功能函数什么的。

你可能感兴趣的:(VC怎么调用ActiveX)