Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Making the transition from Win API SDK to MFC

Making the transition from Win API SDK to MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionlearningdata-structuresjson
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kayembi
    wrote on last edited by
    #1

    Hi, I am thinking of making the transition from using the Windows API SDK with mostly C to MFC - well, more than just thinking, I really want to do it. I have been using the Windows API and learning C with a modicum of C++ for the past couple of years, and have created several small programs (with a lot of help from the kind people here), but now I want to take it a stage further. I have an idea for a Windows program that I'd like to make as professional as possible with a nice GUI, and I think that MFC is the way to go for two reasons: Firstly, given that my program is designed to look a little like a cross between Explorer and a word processor, with a tree view on the left and a rich edit box on the right in a dockable window, I can easily generate the basic GUI of my program using appwizard. Secondly, there are a lot more code examples, both here and elsewhere, that would be very useful for my program that use MFC than the SDK, and so far I have spent a lot of unnecessary time struggling to convert code from MFC to straight C/WinAPI. That's the waffle over, then. Considering that I learn much more easily if I am motivated by a goal (in the case the goal is the software I want to write) rather than by following dry tutorials which teach me how to write small programs I'll never use, I'd really appreciate some tips or advice on where to start with making this transition: 1) I know this is a question that comes up a lot, but what books would people recommend to help me make this transition? Before you shout: I have searched this forum, the FAQ and elsewhere, and the two books that seem to come up the most are Richard Jones's 'Introduction to MFC Programming', and Jeff Prosise's 'Programming Windows with MFC'. I am thinking of buying the Jones, because I am not very familiar with OOP and this is supposed to be easier as an introduction. Is this a good way to go? Or are there other books I may have missed? 2) I am guessing that in order to learn MFC I am going to need to improve my knowledge of C++ drastically - like I say, aside from some limited use of classes, I have mostly used straight C so far. I have the SAMs book by Jesse Liberty, which I am returning to right now, as well as other books which are way out of my league (I don't think I've ever opened my Stroustrup :) ). Should I learn more C++ before turning to MFC? Or can I learn what I need to know about classes and OOP as I go along whilst learning MFC? And if so, are the books above helpful for this too? 3) As a quick test, I tried usi

    R 1 Reply Last reply
    0
    • K Kayembi

      Hi, I am thinking of making the transition from using the Windows API SDK with mostly C to MFC - well, more than just thinking, I really want to do it. I have been using the Windows API and learning C with a modicum of C++ for the past couple of years, and have created several small programs (with a lot of help from the kind people here), but now I want to take it a stage further. I have an idea for a Windows program that I'd like to make as professional as possible with a nice GUI, and I think that MFC is the way to go for two reasons: Firstly, given that my program is designed to look a little like a cross between Explorer and a word processor, with a tree view on the left and a rich edit box on the right in a dockable window, I can easily generate the basic GUI of my program using appwizard. Secondly, there are a lot more code examples, both here and elsewhere, that would be very useful for my program that use MFC than the SDK, and so far I have spent a lot of unnecessary time struggling to convert code from MFC to straight C/WinAPI. That's the waffle over, then. Considering that I learn much more easily if I am motivated by a goal (in the case the goal is the software I want to write) rather than by following dry tutorials which teach me how to write small programs I'll never use, I'd really appreciate some tips or advice on where to start with making this transition: 1) I know this is a question that comes up a lot, but what books would people recommend to help me make this transition? Before you shout: I have searched this forum, the FAQ and elsewhere, and the two books that seem to come up the most are Richard Jones's 'Introduction to MFC Programming', and Jeff Prosise's 'Programming Windows with MFC'. I am thinking of buying the Jones, because I am not very familiar with OOP and this is supposed to be easier as an introduction. Is this a good way to go? Or are there other books I may have missed? 2) I am guessing that in order to learn MFC I am going to need to improve my knowledge of C++ drastically - like I say, aside from some limited use of classes, I have mostly used straight C so far. I have the SAMs book by Jesse Liberty, which I am returning to right now, as well as other books which are way out of my league (I don't think I've ever opened my Stroustrup :) ). Should I learn more C++ before turning to MFC? Or can I learn what I need to know about classes and OOP as I go along whilst learning MFC? And if so, are the books above helpful for this too? 3) As a quick test, I tried usi

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2
      1. I strongly recommend Prosise's book.
      2. Should I learn more C++ before turning to MFC?
        That's exactly what I did several years back. I started creating a few (non-GUI) classes and used them in my Win32 apps. You don't have to be a C++ expert to use MFC, but it's helpful to know the fundamentals. It can save you a lot of head scratching!
      3. I couldn't believe how alien it all was compared to a simple SDK program
        Don't worry, we've all been there. You'll soon get over it as you start modifying the code the app wizards create for you. Remember, the unknown is usually almost always daunting.
      4. simple example of a text editor using MFC
        You could brew your own by creating an SDI app whose view class is a CEditView.

      Good luck and have fun! /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

      K 1 Reply Last reply
      0
      • R Ravi Bhavnani
        1. I strongly recommend Prosise's book.
        2. Should I learn more C++ before turning to MFC?
          That's exactly what I did several years back. I started creating a few (non-GUI) classes and used them in my Win32 apps. You don't have to be a C++ expert to use MFC, but it's helpful to know the fundamentals. It can save you a lot of head scratching!
        3. I couldn't believe how alien it all was compared to a simple SDK program
          Don't worry, we've all been there. You'll soon get over it as you start modifying the code the app wizards create for you. Remember, the unknown is usually almost always daunting.
        4. simple example of a text editor using MFC
          You could brew your own by creating an SDI app whose view class is a CEditView.

        Good luck and have fun! /ravi Let's put "civil" back in "civilization" Home | Articles | Freeware | Music ravib@ravib.com

        K Offline
        K Offline
        Kayembi
        wrote on last edited by
        #3

        Thank you for your reply, it's very encouraging. At first I was scratching my head to your answer to question 4, before I realised that SDI is just "Single Document Interface" (as opposed to MDI) - just the terminology can be daunting at first. :) Everyone seems to recommend the Prosise book, so I think I am going to splash out and buy both, so I can use Prosise's as a reference. Looking through the indexes (indices?) on Amazon.com I see that Prosise's book covers such things as RTF files and tree views, so I can turn to that once I've gone through the basics in Jones and am ready to take on the main aspects of my program. Thinking about your reply to no. 2, I have decided to go through some C++ basics before looking at these books though. I have just bought a very nice and cheap book called "Teach Yourself C++ in 10 minutes" (somewhat ridiculously) by Jesse Liberty. I've started going through it and I really like it, as it recaps on the basics of C and then moves into very short (supposedly 10 mins each) lessons on C++ - OOP, classes, etc. I like it because it means I can grasp the bare basics of some of the C++ concepts without having to wade through 1,000 pages (nothing worse than slogging through a book and thinking "I'm not going to learn how to use a class until page 600, and I'm a slow reader..."), and I can refer to my other C++ books with a more need-to-know approach after I've got some of the concepts (and terminology - one of the problems of being self-taught) pegged. It's very encouraging to hear that someone else has taken a similar route when learning MFC. Thanks again, KB

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups