N
None
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.
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.