0

I want to add a dialog box to a c++ dll application. First of all I would like to know if this is possible and afterwards how can I do the project compile.

When I set in the configurations "using MFC standard library" I receive the error: fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

When I set the configuration using MFC in a shared dll file I receive the error: general error c101008a: Failed to save the updated manifest to the file ".\Debug\RenameDLL.dll.embed.manifest" false parameter.

Any suggestion how to tackle this? I make also use of windows.h library.

1

2 Answers 2

1

Yes, it's definately possible, and "Use MFC in a Shared DLL" is the one you want.

If you have precompiled headers switched on, you'll have a stdafx.h in your project which should contain various #include <afx...> These are the required MFC headers to include.

Your second error I suspect will go away with a Rebuild All.

Another problem you may or may not get is that nothing happens after calling DoModal() on your dialog instance. In that case place AFX_MANAGE_STATE(AfxGetStaticModuleState()) before the DoModal()

0
  • What is MFC standard library? It should be Standard Windows Library.
  • Are you actually using MFC for dialogs (CDialog etc)? If not, don't need to use MFC.
  • If you are using MFC, better to create a DLL project supporting MFC, lookup all the settings and put them into your DLL. It includes, C++ settings, linker and manifest tool settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.