Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. IDispatch from a QAxWidget

IDispatch from a QAxWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 514 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    K.Kleine
    wrote on last edited by
    #1

    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 signature

    inline 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();
    }
    ...

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved