By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

Problems in Hosting an ActiveX Control in a WTL App

P: n/a
Hello

In order to host and use an ActiveX control (non-GUI) in a WTL app, I
followed the following steps:

1. During project creation, the ActiveX Hosting option is enabled.
2. In the dialog editor, the ActiveX control was inserted.
3. An event was added to the dialog by right clicking on the control
and selecting 'Events...'.
4. VS automatically created a .tlh file.
4. In order to use the control and its methods, the following code was
added:

void Connect()
{
CComPtr<_DContinuumClient> m_Ctrl;
hr = GetDlgControl(IDC_CONTINUUMCLIENTCTRL1,
DIID__DContinuumClient,reinterpret_cast<void**>(&m _Ctrl));
ATLASSERT(SUCCEEDED(hr));
}

_DContinuumClient is one of the dispinterfaces for the control. I can
see all the methods associated with this interface in the Typelib view
of the OLE Viewer. Unfortunately I can't access any of these methods in
the VC 6.0. 'm_Ctrl->' only shows the methods of the inherited IDispatch
interface such as AddRef and QueryInterface.

Can anyone tell me what I'm missing here? From the search of the
newsgroups and various websites, it seems that this should be all that
is needed.

Any help or hint is greatly appreicated.
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I apologize as I posted this in the wrong newsgroup.
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.