using MFC in a managed application, ASSERT in AfxGetResourceHandle

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
steps to reproduce the behaviour:
- create a managed C++ Windows Forms Application,
- in the designer view, drag a button on the form
- add the following code to the Click event for that button:
CFileDialog dlg(TRUE);
dlg.DoModal();
- #include <afxdlgs.h> in the Header of that from
- build and run the application (in debug mode)
- when you click the button the following assert in AfxGetResourceHandle
fails:
ASSERT(afxCurrentResourceHandle != NULL)

Note that in the project settings use MFC as shared library is turned on.

Thanks in advance


Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top