Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I initialize dialog based MFC application (i.e. implicitly call MFC application InitInstance() method) when any test method defined in MFC application is called from .NET client via C++/CLI.
I have dialog based MFC application and I am able to successfully call test method defined in MFC Application from .NET client via C++/CLI, but unable to get MFC application InitInstance() method called implicitly.
Please guide me.

Thanks.

What I have tried:

I am successfully able to call the test method defined in MFC Application from .NET client via C++/CLI but unable to initialize dialog based MFC application (i.e. implicitly call MFC application InitInstance() method)
Posted
Updated 18-Mar-17 8:39am
v2

1 solution

You dont have to call InitInstance explicit, but some initialize code for starting up the MFC runtime with AfxWinInit. In both link are interesting code snippets which should solve your issue.

To open a dialog:
C++
CMyDialog dlg;
dlg.DoModal();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900