Thread: api or mfc

  1. #16
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Elysia View Post
    Oh really?
    Maybe that's the case for YOU, but not necessarily the case for OTHERS. There's a REASON why frameworks were invented and why so many companies use MFC. I wonder why...
    Duh.
    Statistical distribution of intelligence and skill level in the programmer base?

    Gerber is great, that doesnt mean I want it for lunch.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    So now you are insulting people, too.
    Yeah, C#, Java, C++, D, Python, Pearl, PHP is crap and should never have been invented.
    C rules and is the only language we ever need.
    All else is superfluous and anyone who can't use it or do it well are morons that needs to be shot.

    And because C rules we don't need crap like MFC, Qt, wxWidgets. We only need the raw API because it rulez and everything else sucks.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Wow, I can see you completely missed the point. Didn't I just get done saying that MFC is better than the API at GUI? So now you imply that im some sort of zealous language bigot hell bent on eradicating coding in anything but 1's and 0's using a car battery and a 27C16.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    No, the point is that I find MFC better at everything.
    Regardless if it's GUI or not.
    Even if it's a wrapper, it's encapsulated in classes which makes everything better.
    C is yesterday. C++ is today.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Elysia View Post
    No, the point is that I find MFC better at everything.
    Regardless if it's GUI or not.
    Even if it's a wrapper, it's encapsulated in classes which makes everything better.
    C is yesterday. C++ is today.
    Now who is being the bigot?
    [sarcasm]
    C++ roolz, C is crap, classes make everything better, for loops suck, use the new CLoop->For() method instead.
    [/sarcasm]

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If you want to compare egos, go ahead. I will stop bickering about this now, since it will neither of us any good.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Elysia View Post
    If you want to compare egos, go ahead. I will stop bickering about this now, since it will neither of us any good.
    No I wont even go near that can of worms. You clearly win in the ego contest. I merely state the fact that I am smarter than 98% of the human race, you think you are a god.

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If you say so.
    I would still, however, say that frameworks are better than the API, because the API is a mess.
    A framework can correct flaws and create a more pleasing environment for many.
    I do NOT think you should diss MFC to only those incapable of using the Windows API.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Well that is where we disagree. I believe that those capable of getting closer to the metal should do so as ultimately they will find it a much more rewarding and productive experience.

  10. #25
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    ROFLMAO, elysia, the api is simpler and more straight forward than MFC any day of the week. It's about as user friendly as you can get, I have no idea where you get off implying that MFC is in any way shape or form user friendly.
    Statistical distribution of intelligence and skill level in the programmer base?

    Gerber is great, that doesnt mean I want it for lunch.
    No I wont even go near that can of worms. You clearly win in the ego contest. I merely state the fact that I am smarter than 98% of the human race, you think you are a god.
    Time and time again in threads with Elysia you attempt to prove your point by personal attacks. This is very tiresome and an extremely immature form of debate. If you and Elysia have issues may I suggest you sort them out outside of otherwise peaceful threads.

    And now to the original question:
    My opinion is that MFC is indeed simpler than pure Win32 API. If that makes me a crappy C++ programmer then so be it...I'm a crappy C++ programmer.

    Any opinion here is going to be just that. In order to find out for yourself which is easier you will have to gain some experience with both.
    Last edited by VirtualAce; 06-30-2008 at 05:39 PM.

  11. #26
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    For me, by chance, I started Windows programming with MFC first. At that time, I was a simple *user* of the framework. Doing something that I'd never done before required hitting the reference material and hopefully finding complete samples that demonstrated what I was looking for.

    Then I got Petzold, and started learning the overall concepts in the Win32 API that MFC "took care of" for me. Once I started understanding how the framework itself worked on top of the Win32 API, I no longer felt like a simple user. Doing something new no longer required samples; just reading the MSDN pages on per-MFC object basis was enough to get going.

    A lot of MFC isn't just a simple wrapper of the raw API - and those parts of MFC I ended up learning last - by virtual of buying and reading an MFC book (document-view arch. comes to mind). And there are other parts of the framework that I've never touched.

    Based on my experience, I used to advocate learning the raw API first, so that you can understand and appreciate what MFC is "taking care of for you" - which would hopefully make for a faster tract towards mastering the framework.

    In the end, I think that if you want to *master* MFC (at least the portions of the framework that wrap raw API's), then the raw API should be learned at some point.

    However, I no longer advocate learning one before the other. I think that really depends on your personal short-term and/or long-term goals.

    gg

  12. #27
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    I learnt WIN32 then MFC.

    I still use both, in the most apps I write.

    Somethings can't be done in WIN32 and many things are quicker with MFC.

    As Codeplug said, depends where you want to take your programming.

    Hobbist would probably be better with MFC and somer WIN32.

    Career, I would recommend a much deeper understanding of WIN32, it will force you to write better code (and allow you to bypass the limitations of MFC as required).
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  13. #28
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Err... may I suggest neither MFC or Win32 API?

    I'm honestly unsure where these two will lead and if at this point it pays to learn them. Probably Win32 API will be around for quiet a while still, but definitely I wouldn't put much effort in learning MFC at this point since Microsoft clearly wants to get rid of it as soon as it can.

    The .Net Framework is a viable and more intelligent alternative to MFC. Viable because it apparently does a better job at streamlining code development than MFC ever did, and intelligent because this is the route Microsoft wants you to take. My gripe with .Net derives solely from the fact I strongly believe this thing should have been built with C++ in addition to C# (if they really had to create C#, in the first place. But that's an altogether different discussion).

    The other option, in case you want to stick to C++ programming, is to learn one of the 3d party libraries available to you. These are extremely good up-to-date libraries that simplify your windows code considerably when compared to MFC (and provide a lot more features). They are also much easier to learn and more more intuitive to use. But more important, they are portable across different OSes. WxWidgets and Qt are the most used ones. I prefer wxWidgets and have been playing around with Qt too.

    WxWidgets seems to me more mature and with more features. But started out in a time when the STL was in its infancy, for which reason it doesn't provide native support for STL types. It doesn't mean you can't use them. Just that it will be a little more awkward to do so, since wxWidgets uses instead its own STL-like objects and you will be constantly casting between types. It's my pet-peeve with wxWidgets, despite being my favorite library. I don't think there's anything you can't do in windows with it.

    Qt is a much more... modern(?)... approach to windows development. It fully supports STL, thank goodness, it outperforms (in my opinion and after only preliminary observations) wxWidgets in several important areas like grid and list controls, screen rendering and multi-threading. Its licensing system however demands money if you want anything above some basic functionality. It also comes behind in number of features when compared to wxWidgets.

    ...

    Personally I would either go with C# or one of those two libraries. After you build some confidence, I only then suggest you learn Win32 API. For one you will be then more motivated to do so. But most importantly, you will also be better prepared to understand some of the gritty details. Not that you can't learn the API without all that baggage behind you, just that it will be easier and probably more fun.

    Finally... a disclaimer:

    I'm not really saying MFC is not an option - I think a large chunk of windows programming is still done in MFC. On the other hand skills in MFC should still be a priority if you are interested in learning windows programming with a career in mind. In that case, definitely forget about 3rd party libraries for now... unfortunately, I say. And go all the way C# on one hand and MFC on the other, with Win32 API as soon as you feel more or less comfortable.

    But I do argue the future of MFC, though. And if you are not immediately pressed, don't go that route.
    Last edited by Mario F.; 06-30-2008 at 08:42 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  14. #29
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    Quote Originally Posted by MacGyver View Post
    They are portable
    Portability is a kid concept.
    99.99% of customers use Windows in Front-End applications.
    They don't care of portability.

  15. #30
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This forum cares about portability. And it's not a kid concept.
    But I would like to say steer away from C# and any dotNet, because IMO, it's a mistake. Plus it will probably not be very portable, and still isn't very portable.
    They are slow and bloated. The borderline between low level programming and dotNet is, well, C++. With the right tools and libraries, we can maintain performance, efficiency, and still write good applications.
    Of course, if you're considering real-world application, you may be forced to go down the path of dotNet, because companies don't really care if it's slow or bloated as long as it takes less time to write an application.
    Last edited by Elysia; 07-01-2008 at 05:51 AM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Win32 API and MFC
    By loopshot in forum C++ Programming
    Replies: 6
    Last Post: 12-07-2004, 11:58 AM
  2. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  3. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM
  4. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  5. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM