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. How can I use MFC DLL in an WIN 32 Application?

How can I use MFC DLL in an WIN 32 Application?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
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.
  • V Offline
    V Offline
    VCSharp007
    wrote on last edited by
    #1

    Hi, WIN 32 application crashes while calling a MFC DLL export function, which creates a dialog box using CDialogBox::Create(). What will be the reason? One more doubt..How can I add MFC support to a WIN 32 Aplication? Thankx In Advance...

    M 1 Reply Last reply
    0
    • V VCSharp007

      Hi, WIN 32 application crashes while calling a MFC DLL export function, which creates a dialog box using CDialogBox::Create(). What will be the reason? One more doubt..How can I add MFC support to a WIN 32 Aplication? Thankx In Advance...

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      If the MFC dialog is created on the main application thread then the main application thread needs to be an MFC UI thread. That means your application needs to be an MFC app. I think the easiest way to convert a Win32 app to MFC would be to create a new MFC project with the app wizard. MFC provides the WinMain() function so... From the Win32 code, take application-wide initialization code and put it in the new app class' InitInstance() override. Cleanup code goes to an ExitInstance() override. The Win32 app's main window message handling can be moved to MFC window message-map style handlers. MFC provides the message loop. Hope that helps get you started. Mark

      "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

      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