Click here to Skip to main content
15,920,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have an application written in VC++ (VS2010--unmanaged code) but I want rich UI so that I would like to use C#. So I want to built my UI using C# and then use it in VC++.
Please let me know whether it is possible to use.
Do I need to use WPF and XAML to achieve rich UI?
What could the problems that I could face if I am using combination of unmanaged code with managed code?
Do I need to convert my unmanaged code to managed code and then I can use that code from C#.

Regds
Posted

WPF will definitely give you a richer UI. Winforms doesn't look that different to MFC. You can make your C++ code managed C++ easily enough, and thus write bridging methods you can easily call. Otherwise you'll need to still put it in a dll, but use p/invoke to write code to call the dll from C#, which will be much more work.
 
Share this answer
 
You can't mix the UI systems between C++ and C#. If there are no UI features in your C++ code you can call it from C#. You can not (easily/practically) call C# from native C++.

An exception to this is C++/CLI, but I don't think you are asking about that.
 
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