Click here to Skip to main content
15,888,182 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an application which is developing in VC++ in VS2010. I need to match up the UI of Android look and feel i.e. it shd be rich. But with VC++ I am facing limitation of rich UI. i search for it and found out that we can host WPF in MFC application to get rich UI. I would like to know is it possible to get rich UI and also whether I will get more controls flexibility (e.g. VC++ CListControl does not provide multi-lining of text in a same row). If there is another alternative for this. Also I need to consider this development with respect to Widows 8.
Pls suggest....
Posted

1 solution

This would be so difficult that getting rid of MFC completely would be much easy, no matter how much UI you might have. And remember that you also would need to maintain it. In principle, I can explain what could be involved, but better don't make me going into it. This is extremely difficult, and making the solution working reliably is nearly impossible.

Well, just a few words: MFC is a normal window application very close to Windows API. In contrast, WPF has very little to do with Windows. Only its main window is a Windows window. It is based on DirectX, and there is no Windows message pumping the the internals of the WPF window. You cannot communicate with other components via messages. You cannot directly insert a WPF control into a window or a windows control into WPF control. You cannot run Windows and WPF main event loop in one thread. And so on…

—SA
 
Share this answer
 
Comments
SNI 9-May-13 8:31am    
I also think the same way but when I see the following URL then I think it would be easy.
http://www.codeguru.com/cpp/cpp/cpp_managed/nfc/article.php/c14589/Hosting-WPF-Content-in-an-MFC-Application.htm#page-2
Sergey Alexandrovich Kryukov 9-May-13 8:55am    
Yes, this is really the way, but... Do you think it will be easy? Well, go ahead and try, only remember that you would need to exchange events with such UIElement between MFC host window and WPF. I warned you. Maybe it would be interesting to try...
—SA

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