[RESOLVED] MFC or QT?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: [RESOLVED] MFC or QT?

  1. #1
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    9

    [RESOLVED] MFC or QT?

    Hi All,

    Here a noob, before I'm going to throw myself into the deep about Windows programming, I have some questions about the type of framework.

    There is; so far I have read about it and understand about it, MFC and QT, so whatís the best? And why should it be the best?

    According to my dad I must learn MFC, but he is a little MS minded and since I'm a teen and he is a parent, why should I listen *kidding*. So please help me with my choice, what type of framework should I use?

  2. #2
    Join Date
    Aug 2009
    Posts
    439

    Re: MFC or QT?

    I have only worked with QT, but I can say that it is a nice framewor. It is cross platform which is nice and Qt Creator is actually a good IDE. On top of that, PyQt is a set of Python bindings for Qt which makes rapid prototyping fairly easy. Anyway, this is just one opinion

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,020

    Re: MFC or QT?

    I'm going to throw myself into the deep about Windows programming
    Well, it depends on your understanding of Windows programming. If by that you mean you are to be able just to create programs runnable in Windows, both are just fine.

    Qt is a heavy force with it's own philosophy and culture, and lots of classes that hardly could give you an impression of what Windows programming really is. Instead, those are more like implementing OS independent approach (remember that Qt is a cross platform framework applicable on Linux and MAC OS as well.)

    MFC is of a really lesser grade of being OS independent, in fact it's just a tiny wrapper over pure Win API, when it is about programming windowed stuff. So, it may be called a real Windows programming with a subtle abstraction layer. As to philosophy and culture of MFC, it's more about document-view architecture (single- and multi-document apps), database and ActiveX programming (the latter is really thick and heavy.)

    So, now you have to decide what is your goal. OS independent programming and possibly cross platform later? Or really close to Windows API and architecture?

    Anyway, I really believe that there is no ultimate truth in a single OS, language or framework, but all of them have a value on its own as well as reasonable limits of applicability. To know the value and the limits you have to know the subject. So, if I were you, I would learn both.
    Best regards,
    Igor

  4. #4
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: MFC or QT?

    It depends a bit on what your goals are (specific Windows-only stuff or general programming). If you have no windows-specific stuff, I would advice you to checkout both. I use both, and from a general point of view, I prefer QT.

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,115

    Re: MFC or QT?

    Honestly, these days, there's a lot more work out there with C# and .Net, and for a beginner, they'd be easier to learn. Unless you have a compelling reason to learn c++, I'd go with C#.

  6. #6
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    9

    Re: MFC or QT?

    Hi all

    Thanks for all your answers and opinions, think I have decided for myself what the next step is:

    My both parents are ICT nerds, dad is C++ programmer mom a SAP consultant, so you can say I have (still am) been growing up with computers and bits and bytes LOL. Think because of that I got interested in programming in C# at the age of 8 and at age of 10 in C++ Managed. Have built some applications, 2 as practicing projects that dad gave me, and 1 application for my old (elementary) school. Two written in C# and one in Manage C++.

    The last year I went Native , and I learned myself, and of course my dad helped me, good thing he got patience that I donít have, C/C++.

    And now itís time for me to take the next step, thatís why I asked this question as posted in this forum. OK whatís my goal; hmmm well this will be my first goal in my live LOL, thinking out loudÖ

    .. one thing is sure, itís better to learn both the frameworks, but to learn them at same time, no I donít want that, one thing at the time. In the environment Iím living in, arenít any Mac and Linux OS computers, so it will be Windows.

    Then my goal is: to understand more about Windows programming in the Native way, so Iím going to choose for the framework MFC, and later on, to see what QT have to offer me

  7. #7
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: MFC or QT?

    Quote Originally Posted by SabNary View Post
    In the environment I’m living in, aren’t any Mac and Linux OS computers, so it will be Windows.
    Wait, you live in a world without iPhones/iPads

    OK, seriously, I'd go with GCDEF's suggestion. As much as I hate to admit it, but MFC is almost dead. There's a hint of support from Microsoft and they did add some new MFC components in VS 2010 but all that stuff is not as widely used as C# and .NET. Another benefit of the latter is that you can almost seamlessly transition into programming for the web, which is not the case for MFC. As Igor said above, MFC is closer to an older low-level programming language for Windows only.

    So if I were to start from scratch these days I would go with C# and .NET (obviously provided that I wanted to "invest my knowledge" into Microsoft products.) The only benefit of learning C/C++/MFC is to gain the understanding of such important concepts as memory and resources management, which unfortunately is pushed to the side in all those managed languages these days.

    Now the following has nothing to do with your question, just as a suggestion, if I were you I would also learn JavaScript language. Not to confuse with Java though. (JavaScript has syntax very similar to C++. It is used primarily in web browsers and other software components.) The way things are going now, this language will be really handy when programming for the web (HTM5 stuff) and also when writing apps for the upcoming Windows 8. I honestly don't know Microsoft's projection for the future of the .NET and whether they will continue to support it or not? (It may even go the path of WebOS, who knows?)

    So going back to your question, QT is a nice "beast" in itself. Its obvious advantage is its cross-platform spread. So think about that as well.
    Last edited by ahmd; January 30th, 2012 at 05:32 PM.

  8. #8
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,020

    Re: MFC or QT?

    Then my goal is: to understand more about Windows programming in the Native way
    One thing left to add. Any framework is typically to let developer be more productive, and code be more maintainable. Besides, it obscures quite a lot of details that might be interesting to touch being learning the very basics.

    In fact, to learn Windows native world you never need any production framework. Just take a look at Jeff Richter's book 'Windows via C/C++', which code has no sophisticated framework in use. Nevertheless it guides you through native Windows programming very effectively.
    Best regards,
    Igor

  9. #9
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    9

    Re: MFC or QT?

    Quote Originally Posted by Igor Vartanov View Post
    In fact, to learn Windows native world you never need any production framework. Just take a look at Jeff Richter's book 'Windows via C/C++', which code has no sophisticated framework in use. Nevertheless it guides you through native Windows programming very effectively.
    Hi, we have that book here on the shelf, going through the pages as we speak, huh.. as I type, so to learn Windows Native it is better to learn it in plain code as I'm calling it, so I can learn all the in and outs of the OS, then later on learning MFC for better and more easy GUI handling?

  10. #10
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,020

    Re: MFC or QT?

    In my case it was exactly like that. I started from learning plain C Win API programming. After getting quite a good understanding of Win API structure, concepts and typical approaches it was a pure fun to move to MFC. One thing, very important though: I had a lot of time to get a grip on that, and there was no any rush, but was a strong desire to understand what goes on under the hood.
    Best regards,
    Igor

  11. #11
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    9

    Re: [RESOLVED] MFC or QT?

    @Igor Vartanov, well I'm not in a hurry, and think it is a good way to learn and understand Windows too, so going to start with the book, and if I have any questions I know where to find you somewhere around here

    Thanks for tip

  12. #12
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,020

    Re: [RESOLVED] MFC or QT?

    You're always welcome.

    I believe it would be good to mention as well a great book I really started with: Charles Petzold, Programming Windows. Richter's book came later. Which was really good, as Petzold's book gave me some basic understanding of Windows C program structure and VC compiler techniques.
    Best regards,
    Igor

  13. #13
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,020

    Re: [RESOLVED] MFC or QT?

    Besides, there is C++ and WinAPI forum here on CG where you might find some valuable info as well.
    Best regards,
    Igor

  14. #14
    Join Date
    Jan 2012
    Location
    Netherlands
    Posts
    9

    Re: [RESOLVED] MFC or QT?

    Quote Originally Posted by Igor Vartanov View Post
    I believe it would be good to mention as well a great book I really started with: Charles Petzold, Programming Windows.
    Got lots of books but not this one, thanks for the tip, going to ask parents if they can buy this one too, *putting on my poor puppy dog face, and going to ask them* this always works

    And thanks for the C++ WinAPI link

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center