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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. COM
  4. MFC to ATL ????

MFC to ATL ????

Scheduled Pinned Locked Moved COM
c++comtutorialquestion
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.
  • L Offline
    L Offline
    Leesen
    wrote on last edited by
    #1

    Is there any tool like java2idl that can directly change MFC code into ATL code??? I am now modify some MFC code ,in order to change it into a COM .But there are lots of problems, such as,type dismatch, return value . Anyone have some ideas about the steps how to proceed . I will preciate it. regards.

    N V 2 Replies Last reply
    0
    • L Leesen

      Is there any tool like java2idl that can directly change MFC code into ATL code??? I am now modify some MFC code ,in order to change it into a COM .But there are lots of problems, such as,type dismatch, return value . Anyone have some ideas about the steps how to proceed . I will preciate it. regards.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Changing from MFC to ATL is a complicated procedure as you have found out. You don't need to go through the pain. You can make a MFC COM object although that has it's own pains.

      L 1 Reply Last reply
      0
      • N Not Active

        Changing from MFC to ATL is a complicated procedure as you have found out. You don't need to go through the pain. You can make a MFC COM object although that has it's own pains.

        L Offline
        L Offline
        Leesen
        wrote on last edited by
        #3

        I plan to copy all the MFC Class ,Including GUI Class ,such as Frmae,View, to the Atl Project .And it can be complied successfully. Then I can further modify the Atl project based on that. I will add some interface in Atl project to call function instead of the automation message loop . In this way , I think I could let the Atl dll run in VB GUI,with his own GUI (Frame ,view,Dialog ) just loaded in memory and not shown. This is my idea . What do you think of it ? I just want to get a general structrue ,and then I can modify the Atl code into more simple project,such as change Frame,view into other substitutes. In this way ,I can achieve my goal. Expecting your advice. Now I have copied all the MFC Class ,Including GUI Class ,such as Frmae,View,from the MFC Project to the Atl Project .And it can be complied successfully. But when I attempt to register the DLL I get the following error: Debug Assertion Failed! Program: C:\WINNT\System32\regsvr32.exe File: D:\Program Files\Microsoft Visual Studio\VC98\MFC\SRC\APPCORE.CPP Line: 85 Expression: ASSERT(AfxGetThread() == NULL); So what does this really tell me and what can I do to correct it? Any ideas???

        1 Reply Last reply
        0
        • L Leesen

          Is there any tool like java2idl that can directly change MFC code into ATL code??? I am now modify some MFC code ,in order to change it into a COM .But there are lots of problems, such as,type dismatch, return value . Anyone have some ideas about the steps how to proceed . I will preciate it. regards.

          V Offline
          V Offline
          Vivek Rajan
          wrote on last edited by
          #4

          Bliven wrote: Is there any tool like java2idl that can directly change MFC code into ATL code??? I am now modify some MFC code ,in order to change it into a COM .But there are lots of problems, such as,type dismatch, return value . There is no tool that I know of, because it is *difficult* What kind of MFC code do you want to change to ATL ? It is a simple COM object, ActiveX control, or full blown MFC app ? In any case, I wish you luck V

          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