Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Which is really the better approach to windows apps development: MFC or native C/C++ ciding?
Posted
Updated 24-Oct-13 17:34pm
v3
Comments
Jim Jos 24-Oct-13 23:15pm    
I am confused mate.. MFC or C/C++ u mean without any standard libraries MFC is a standard library.. C++ without MFC without .NET ?
Gbenbam 24-Oct-13 23:36pm    
Kindly check out the updated more explicit version of the question.
Captain Price 25-Oct-13 1:42am    
I am confused, because I have always considered MFC as native.
Andreas Gieriet 25-Oct-13 4:50am    
Use WPF/C#?
Cheers
Andi

Can you write one single universal predicate "bool IsBetter(Technology one, Technology two)"? I doubt it, as it's hardly possible to define what is "better". Better for what?

It really depends on the purpose. Both ways are not the easiest for application development, but with MFC you can freely combine both. If you want to learn Windows, it's very useful to develop some software using raw Windows API. And even if you do everything in MFC, it's better to understand how raw Windows API works.

MFC includes a lot of obsolescent features, in particular, it doubles a good deal of standard C++ library (STL, std::* namespaces) templates/classes but is not compatible with then, which is just a considerable annoyance. And generally, MFC is old, rusty, bulky and ugly, also proprietary. There are a number of different C++ frameworks which are more elegant and not proprietary like MFC, and some are also multiplatform, in contrast to MFC, set aside even better non-C++ frameworks and .NET. So MFC would be my very last choice.

—SA
 
Share this answer
 
v3
Comments
CPallini 25-Oct-13 5:41am    
5."old, rusty, bulky and ugly" :-D
Sergey Alexandrovich Kryukov 25-Oct-13 9:53am    
Thank you, Carlo.
—SA
Philippe Mori 26-Oct-13 9:27am    
Well MFC is still a lot better that using Win32 API. I have not used it a lot since when it was popular, we were using Borland C++ with OWL and then later C++ Builder with VCL.

Generally, I would recommand using .NET for Windows development. WinForms is quite easy to learn and use. If you are more ambitious, then I would suggest to learn WPF.
Sergey Alexandrovich Kryukov 26-Oct-13 20:26pm    
I don't think you can even pose a problem like this. Better for what? And I cannot agree that WPF is anyhow related to greater ambitions; it depends what do you want to do. Your advice make full sense though.
—SA
Philippe Mori 27-Oct-13 8:42am    
Better (for MFC) because it is an abstraction somehow although very thin but it take care of message routing and Windows procedure and the like... Thus you have a bit less détails to wonder about.

More ambitions (for WPF) in 2 senses: a) If you want to make more ambitious user interface (with animation for example) b) If you want to take time to learn how to do things as the initial Learning curves is bigger. It not that bad since WPF can mostly be used as Winforms in the same way that one can use C++ only as a better C...
I am confused with your question.
Your question:
MFC or native C/C++ coding?


I believe by "native C/C++" you meant the raw Win32 API. I have always considered MFC and Win32 to be native and .Net to be managed. I guess you haven't learned neither MFC nor Win32. So I advice you to first learn the Win32 API first and move onto MFC. Then you will understand which is better for a given purpose.

If you learn Win32 API first, moving onto MFC will be very very easy. This way you will understand more about how an OS works. This is a great book to learn the Win32 API.
 
Share this answer
 
Comments
Gbenbam 29-Oct-13 11:09am    
For your information.I know both MFC and win32.I ventured into MFC because it was supposed to save time.If you use the docement-View architecture, yes, otherwise they both seem the same to me.
Hello GbemBam ,

You can not compare two technologies. Every technology have its own pros and cons.
I am also studying windows app development i come across a result if you are not trying to develop game and/or application that needs a very sharp hardware communication then you can proceed with any of oop language of your choice. but when it comes to hardware interface like sensors, GPS etc you should go with C++.
 
Share this answer
 
v2
Comments
enhzflep 25-Oct-13 2:09am    
I've seen 'oops' written time and time again. I'm familiar with 'oop', but not 'oops'.
What do you propose the 's' stands for?
thatraja 25-Oct-13 5:52am    
Actually I did that late(I should have mentioned that in my second comment). You too have a great weekend!
:)
C For Code!!! 25-Oct-13 5:53am    
OK sorry if this makes you feel bad....
But i think your comment is just like a baby who comes in math class asked teacher
"Sir! yesterday you said let x=Rahul and today when i was calling rahul x, he was not listening "
Question posted here not to discuss oop and oops
Thanks !!!
Hope it helps you
Gbenbam asked:
According to you, "There are a number of different C++ frameworks which are more elegant and not proprietary like MFC". Please, may I know some if not all of these other C++ frameworks that are more elegant than MFC and that are not propriety.
Listing only C++ and only cross-platform frameworks, I would point out just two:
  1. http://en.wikipedia.org/wiki/GTK%2B[^],
    http://www.gtk.org[^];
  2. http://en.wikipedia.org/wiki/Qt_%28framework%29[^],
    https://qt-project.org/[^].


Both have bindings to other languages.

On Windows only, you can also consider the frameworks from this list: http://en.wikipedia.org/wiki/List_of_widget_toolkits#On_Microsoft_Windows[^].

And of course you can consider other cross-platform frameworks:
http://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C_.28including_bindings_to_other_languages.29[^],
http://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C.2B.2B_.28including_bindings_to_other_languages.29[^].

If we also consider C++/CLI, it adds the solution based on .NET System.Windows.Forms also cross-platform, because such application could be run (without recompilation) on a number of non-Microsoft platforms via Mono:
http://en.wikipedia.org/wiki/Mono_%28software%29[^],
http://www.mono-project.com/[^].

—SA
 
Share this answer
 
v2
Comments
Albert Holguin 13-Nov-13 14:10pm    
Sure there's other options... the "more elegant" part is debatable. ;) ...we work with Qt, I wouldn't exactly call that more elegant, plus their documentation is not nearly as good as what MS has for MFC.
Sergey Alexandrovich Kryukov 13-Nov-13 14:40pm    
Well, I must agree, it's debatable... My point about "elegance" is rather negative, in relation to MFC. Don't forget the original point of discussion I reflected in comments and not in this answer written in reply to comment: the value of native Windows API. This is the pure original API which can be good to know, and this is a starting point for implementation of any UI framework for Windows. To me, the biggest MFC problem is the use of preprocessor in message handling. Long time ago, I tried to develop my own way of doing it, in part using some ideas of Borland approach, and I think it was more elegant...
—SA
Albert Holguin 13-Nov-13 16:06pm    
Yeah, I don't like that part of MFC either, and it is definitely reliant on that heavily. The documentation for Qt however is pretty crappy given how big of a package it is (and the commercial support behind it). Every framework has it's positives and negatives, it's definitely good to know what's going on behind the scenes.
Sergey Alexandrovich Kryukov 13-Nov-13 16:11pm    
I know, documentation is the problem...
—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