Results 1 to 5 of 5

Thread: How to access OCX methods and events

  1. #1
    Join Date
    Sep 2006
    Posts
    10
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default How to access OCX methods and events

    Hi,

    I have one OCX file called SAMPLE.OCX and I registered that ocx by regsvr32.
    It has 4 methods and 3 events.
    I want to access the methods of that OCX file and get the signals of the OCX.

    How to do in Qt-3.3.4 .?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to access OCX methods and events

    Is OCX the same as ActiveX? If so, you can use the ActiveQt framework.

  3. #3
    Join Date
    Sep 2006
    Posts
    10
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: How to access OCX methods and events

    Thanks,
    I have used the ActiveQt classes for this task.
    I have given my sample code.

    QAxWidget* sampleWidget = new QAxWidget();
    sampleWidget->setControl( //{8E27C92B-1264-101C-8A2F-040224009C02}// ); // UID taken from regedit

    QObject::connect( (QObject*) sampleWidget, SIGNAL(OnReturn()), this, SLOT(returnResponse()) );

    sampleWidget->dynamicCall( "doProcess(QString&)", lstring);

    #) dynamicCall() method not accessing that particular method
    #) response also not received for OnReturn() signal.

    Anything I have to do?

    Thanks

  4. #4
    Join Date
    Jun 2015
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to access OCX methods and events

    You can use dumpcpp.exe to create a class and use the methods simply.
    just run Run CommandPrompt Qt5.5 64bit for desktop
    then write the bin address for Qt for example :
    D:\Qt\Qt5.5.1\5.5\msvc2013_64>cd bin
    then run dumpcpp.exe and write the ClassId , for exmaple
    D:\Qt\Qt5.5.1\5.5\msvc2013_64\bin\dumpcpp -nometaobject {6DC390A4-4DE4-46CC-AEA6-B36F364CA9B0}//CLSID

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to access OCX methods and events

    If you are using Visual Studio with the Microsoft compiler toolchain, you can also use the #import directive with the type library or DLL name to do essentially the same thing without having to run an external tool. However, dumpcpp looks like it has additional options which might be useful in some circumstances.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 2
    Last Post: 28th January 2006, 14:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.