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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sanjay_thakurAuthor Commented:
Any help will be graetly appriciated.

Vinayak KumbarSr Program ManagerCommented:

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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sanjay_thakurAuthor Commented:
   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.
Vinayak KumbarSr Program ManagerCommented:

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.
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)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.