Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MFC ActiveX and Interfaces

MFC ActiveX and Interfaces

Scheduled Pinned Locked Moved C / C++ / MFC
c++comhelptestingtools
4 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    Paul Selormey
    wrote on last edited by
    #1

    Hello All, I have MFC-based ActiveX control. I implemented other Automation objects and interfaces-CCmdTarget stuff (some creatable). Now, when trying to use the control in MFC applications, the ClassWizard does not generate wrapper for the automation objects (only the ActiveX control). This is no problem in VB test application. Is there anything extra I need to do with the *.odl file for the ClassWizard to use it effectively. VC++ compiler-based COM wrappers could be generated as usual but this is not clean and nice to has clients to do. Any help? Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!

    B 1 Reply Last reply
    0
    • P Paul Selormey

      Hello All, I have MFC-based ActiveX control. I implemented other Automation objects and interfaces-CCmdTarget stuff (some creatable). Now, when trying to use the control in MFC applications, the ClassWizard does not generate wrapper for the automation objects (only the ActiveX control). This is no problem in VB test application. Is there anything extra I need to do with the *.odl file for the ClassWizard to use it effectively. VC++ compiler-based COM wrappers could be generated as usual but this is not clean and nice to has clients to do. Any help? Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!

      B Offline
      B Offline
      Bret Faller
      wrote on last edited by
      #2

      You should have a .tlb file which in ClassWizard you can select New Class from Type Library and it will generate the cpp/h for the type-library. Also, if you don't want to have the header/cpp files you can always do an #import. Bret Faller Odyssey Computing, Inc.

      L P 2 Replies Last reply
      0
      • B Bret Faller

        You should have a .tlb file which in ClassWizard you can select New Class from Type Library and it will generate the cpp/h for the type-library. Also, if you don't want to have the header/cpp files you can always do an #import. Bret Faller Odyssey Computing, Inc.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Or if you want to take life into your own hands, use the APIs directly: CLSIDFromProgID, CoCreateInstance, IDispatch::GetIDsOfNames, IDispatch::Invoke, etc. :) :) :)

        1 Reply Last reply
        0
        • B Bret Faller

          You should have a .tlb file which in ClassWizard you can select New Class from Type Library and it will generate the cpp/h for the type-library. Also, if you don't want to have the header/cpp files you can always do an #import. Bret Faller Odyssey Computing, Inc.

          P Offline
          P Offline
          Paul Selormey
          wrote on last edited by
          #4

          Thanks, now I get it. The ClassWizard is using the VB generated *.oca file. I used the From the Typelib and selected the *.tlb and it works. Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups