Link to home
Start Free TrialLog in
Avatar of sanjay_thakur
sanjay_thakur

asked on

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.
Avatar of sanjay_thakur
sanjay_thakur

ASKER

Any help will be graetly appriciated.

ASKER CERTIFIED SOLUTION
Avatar of Vinayak Kumbar
Vinayak Kumbar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
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)