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