Jump to content
Software FX Community

mcdigital

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by mcdigital

  1.  Hello

    I told you that I use the component from QT in a big app and sending a sample will be a bit difficult.

    Code in general is:

     

    //Create an annotation list

    measureAnnotList.CreateInstance(__uuidof(AnnotationX));
    chart->AddExtension((IUnknown *) measureAnnotList);
    measureAnnotList->PutToolBar(FALSE);

    //Create a handler for the events:

    AnnotationsEventHandler *pAnn = new AnnotationsEventHandler((IUnknown *) annotationList);
     

    /The event handler class:




    AnnotationsEventHandler::AnnotationsEventHandler(IUnknown* intf, QObject* parent, const char*  name)
    : QObject(parent, name)
    {
    pAnnotationsEventHandler = new QAxObject ((IUnknown *) intf,this);
    connect( pAnnotationsEventHandler, SIGNAL( signal(const QString&,int,void*) ), this, SLOT( annotationsSignalDispatch(const QString&,int,void*) ) );
    }

    // slot
    void AnnotationsEventHandler::annotationsSignalDispatch 
    (
    const QString& signalName,
    int   argc,
    void*   argv
    )
    {
    qDebug("CALLING AnnotationsEventHandler() - SIGNAL: "+signalName);

    }

     

    Let me clarify that 

    connect( pAnnotationsEventHandler, SIGNAL( signal(const
    QString&,int,void*) ), this, SLOT( annotationsSignalDispatch(const
    QString&,int,void*) ) );


    Catches ALL the events of an activex control so they are relayed to the method 
    annotationsSignalDispatch(const
    QString&,int,void*)

    unfortunately the only event that is received is   HRESULT SelectionChanged ( );
    while the one i have in tlh are:

    struct __declspec(uuid("4b6f58cf-365a-11d1-8fd4-00aa00bd091c"))
    _AnnotEvents : IDispatch
    {
      //
      // Wrapper methods for error-handling
      //

      // Methods:
      HRESULT LButtonDblClk (
      struct IAnnObject * pObj,
      short * nRes );
      HRESULT ObjectCreated (
      struct IAnnObject * pObj );
      HRESULT ExecuteCommand (
      short nID,
      short * nRes );
      HRESULT SelectionChanged ( );
      HRESULT StartMoving (
      int Left,
      int Top,
      int right,
      int bottom );
      HRESULT OnMoving ( );
      HRESULT EndMoving ( );
      HRESULT ObjectDeleted (
      struct IAnnObject * pObj,
      short * nRes );
    };

    So if my code catches the selectionchange event then it is implemented properly. The question is why I do not receive the rest of the events that actually I am more interested in.

    Do I need to set a flag or something for the  measureAnnotList ?

    Thank you in advance.

  2.  Dear allfirst of all I am sorry that I am forced to use your activex control. I have not seen a worst chart control in my life.I lost a huge amount of time now trying to make a Circle object really a Circle. I want to be able to add Circle objects and restrict them to be cirlces as your Circle object is actually an ellipse.Anyway...there is no flag in the object to that so I decided to change the size on the move/resize events, but that is also not possible. I use the damned component from QT and I connected to the events, but the only event that gets fired is  selectionChanged()I hope it is again one of those damned flags you have that I must set somewhere in order to receive all the event (The help is awful too)Any help will be highly appreciated.I hope at least you will be quick enough in this forum.Thank you in advance

    And please if you delete my post again I will take the time to find all sites and articles where your component is listed and write a "Review".

    10x

×
×
  • Create New...