Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Instantiate a simple ActiveX object

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
I'm still thoroughly confused when it comes to trying to program for Windows. Not that I've been putting all that much effort into it...

Could someone tell me how to create a program that will:

1) Instantiate an ActiveX object (*.ocx file)
2) Read a numeric property from the object (type int)
3) Display that number on the screen

This is something that is very easy to do in Visual FoxPro using the CreateObject() function. I don't have the faintest clue how to do this in VC++.

Thanks,

Ian
 
Thru Visual studio menu add an activex control by Add - components and controls - 3rd party (..I don't remember exactly) say Microsoft communications comtrol 6.0) to the program

Drag and Drop the control on the FormView

Now With ClassWizard define c control CMSComm m_commCtrl;

Now, inside your program say OnACtivateView()
{
u can access m_commCtrl....functionname()

any member functions/ data can be accessed
}

similarly u can use MSFlexGrid also

ANy further queries : manoj.padhi@alcatel.com
 
Thanks! That gives me a shove in the right direction at least :eek:)

Now I just need to figure out how to make a DLL that wraps some of the functions and I'm all set! LOL

Wish me luck,

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top