troubleshooting Question

Call MFC Dialog Class from WIN32 .exe Program (Mixed Program)

Avatar of alanolebeck
alanolebeckFlag for United States of America asked on
C++Microsoft DevelopmentEditors IDEs
19 Comments2 Solutions1429 ViewsLast Modified:
I have a WIN32 Application CPP program (not MFC) making calls to various dialogs and other functions also in WIN32 (not MFC).  Now in addition I want to call a function in a separate module that in turn uses the MFC Dialog class and DoModal.  I can get successful compile but the Debug version always returns a AfxGetResourceHandle assertion error and never shows the dialog box.  The release version shows the dialog box and then crashes.
I need to find some sample code that shows how to link MFC subprograms with WIN32 calling programs.  I have looked at a lot seemingly promising examples but they are just not close.  I have studied MSDN q173974 but this is for ATL and seems off.  I have tried many of the suggestions using various AFX calls with no luck.  I can send sample program easily.  Thanks,  Alan Lebeck
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 19 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros