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. Add MCF support to an existing standard DLL

Add MCF support to an existing standard DLL

Scheduled Pinned Locked Moved C / C++ / MFC
c++comquestion
2 Posts 2 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.
  • C Offline
    C Offline
    ChemmieBro
    wrote on last edited by
    #1

    So far I have found these two articles about adding MFC Support to an existing ATL DLL. They are both very similar. http://www.codeproject.com/com/COM_EXE_Server.asp#xx1175657xx[^] http://support.microsoft.com/kb/q173974/[^] Is there a way to add MFC support to an existing, non ATL, DLL?? I really only need just to add a simple dialog with a progress bar and a cancel button but my existing project is making this hard. Is it possible to use WTL somehow? I have never used it before. Thank you!

    B 1 Reply Last reply
    0
    • C ChemmieBro

      So far I have found these two articles about adding MFC Support to an existing ATL DLL. They are both very similar. http://www.codeproject.com/com/COM_EXE_Server.asp#xx1175657xx[^] http://support.microsoft.com/kb/q173974/[^] Is there a way to add MFC support to an existing, non ATL, DLL?? I really only need just to add a simple dialog with a progress bar and a cancel button but my existing project is making this hard. Is it possible to use WTL somehow? I have never used it before. Thank you!

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      Yes. Lose the DllMain. Create a object dervied from CWinApp, declare global instance of it. Whatever was done in DLL_PROCESS_ATTACH, do it in CWinApp::InitInstance Whatever was done in DLL_PROCESS_DETACH do it in CWinApp::ExitInstance. Link with appropriate MFC library (static or dynamic). There may be a few other compiler or linker settings to tweak, but that is the gist of it.

      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