Unsolved IDispatch from a QAxWidget
-
Dear all,
i'm actually trying to use an ActiveX Control in my QtWiget application.
There are different classes that inherit from QAaxWidget
The 'master' class (as described in the manual) has a method with the following signatureinline int Attach(IDispatch* Obj);
I would like to attach an object of another class (also inherited from QAxWidget) to this master class.
How can i get an IDispatch* from an existing QAxWidget based object?Example:
class Marker : public QAxWidget
{
}class View : public QAxWidget
{
}...
Marker* m_Marker = new Marker();
View* m_View = new View();m_Marker->attach(?? here i need an IDispatch* from m_View);
Here is how it is done in VC++
...
LPUNKNOWN pUnk = pWnd->GetControlUnknown();
LPDISPATCH pDisp = NULL;
pUnk->QueryInterface(IID_IDispatch, (void**)&pDisp);
if (pDisp)
{
m_Marker.Attach(pDisp);
pDisp->Release();
}
...