Date: 2005Jun3
Title: Doing COM in Microsoft Visual C++ 6
To create a COM object
---------------------
- File | New ... | Projects | MFC ActiveX ControlWizard
(Do *not* select ATL COM AppWizard)
- Use the wizard to generate the control and compile it.
You should now have a registered .OCX file!
- Click on bold name of the project in the explorer window
(typically on the left) and to View | Class Wizard to add methods
To use a COM object
-------------------
- Project | Add to project | Components and Controls | Registered ActiveX Controls
and insert into your project
- You should now have a C++ class that wraps the COM object but you can not
just use this class any way you want. You should place the control in
a dialog (just you would do with an EditBox) and use from there. If the
control has no visual use, you can hide it.
Add a comment
Sign in to add a comment