How do I Dynamically Add ActiveX Controls to a CWnd.

D

Doug Goodhew

In the header file of a class Derived from a CWnd class I have
imported the OCX.

#import "msvbvm60.dll" rename("RGB", "myRGB") rename("EOF","myEOF")
#import "GSEgrids.ocx"

And created a pointer to the OCX

GSEGrids::_GSEbaseGridPtr m_GSEBaseGrid;

Then in the inilization of my cWnd class I have create an instance of
the OCX

m_GSEBaseGrid.CreateInstance("GSEGrids.GSEbaseGrid");

After executing the above I can access all of the methods and
properties of the OCX with no problem.

The problem is I can't see how to make the OCX visible in my cWnd
window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top