Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC UI
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 4:25am
SNI1.5K

1 solution

Rate this: bad
good
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…
 
—SA
  Permalink  
Comments
SNI at 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 at 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)

  Print Answers RSS
0 OriginalGriff 587
1 Sergey Alexandrovich Kryukov 479
2 Maciej Los 305
3 BillWoodruff 220
4 Mathew Soji 195
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,817
2 DamithSL 5,461
3 Manas Bhardwaj 4,946
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2014
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