How to activate ActiveX object in MFC application.

I have downloaded one ActiveX object for Intermec Printer. I want to use this in my application. I have done the following:

I have added the object from componentes and gallery (in project submenu). This has created one source file and header file. The source file containing one class derived from CWnd.
Now i want to use that class but some exception error is coming.
It is giving me assertion fail like this.
// not an OLE control (not yet, at least)//

Can anybody tell me how to use that activex object in my application.

I am new to activex control.
LVL 4
sanjay_thakurAsked:
Who is Participating?
 
Vinayak KumbarConnect With a Mentor Sr Program ManagerCommented:
Hi,

Have u installed that ActiveX?
Have u included the .h file of the activeX control?. Then Create a object of that class and start using it.

VinExpert
0
 
sanjay_thakurAuthor Commented:
Any help will be graetly appriciated.

0
 
sanjay_thakurAuthor Commented:
Hi!
   I have done that already. I installed that object and it created one sourec file and header file. I included that header file too!
I am wondering if any function is to be called before creation of object of that class (provided by activex).

If u know then let me know.
Thanks,
Sanjay
0
 
Vinayak KumbarSr Program ManagerCommented:
HI,

Without having the object, u can't call any function of that class or access tyhe member variable for that class.

So create the object and do those operations.
VinExpert
0
 
sanjay_thakurAuthor Commented:
Hi! Man,
I told u that i have alraedy done that.
And it is compling and linking too!
But at the time of running it is giving an assertion fail
:(Not an OLE object /Not yet)
0
All Courses

From novice to tech pro — start learning today.