Click here to Skip to main content
13,144,309 members (32,187 online)
Rate this:
Please Sign up or sign in to 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 8-May-13 3:25am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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…

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.
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...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100