CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2013
    Posts
    2

    Win32 API vs MFC vs SDK

    Hello everyone!
    I'm learning win32 api and have a few questions which I can't find any easy answers to. It would be great if someone could explain them!

    So what I've understood so far is that Win32 uses C, wherein I have to write my own code to deisgn the window, i.e. the old fashioned way.

    And MFC are C++ classes, like a wrapper around Win32. It makes designing easier by the drag and drop functionality.

    But what is SDK?

    And is there a difference between MFC functions/objects and MFC CObject API?

    My concepts are all over the place right now....so it would be really awesome if someone could help me understand.
    Thanks a lot for the help!! I really appreciate it!

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Win32 API vs MFC vs SDK

    Sorry, but you are wrong in your concepts. Plain Win32 API can be used in almost any language but not only C, and surely one of those languages is C++. I'm not quite sure of your understanding of "design by drag and drop" but I have bad news for you: you can't just drag and drop when programming MFC, though admittedly a certain level of help (wizards) really exists in VS IDE. On the other hand, resource editor remains the same functional in Win32 projects when it's about designing dialog windows in C or C++.

    SDK stands for Software Development Kit, a very general term. And Windows Platform SDK in fact is the kit that allows you to access Win32 API in C/C++ projects for Windows desktop and server programs.

    And sorry, I did not get your other question about MFC CObject.
    Best regards,
    Igor

  3. #3
    Join Date
    May 2013
    Posts
    2

    Re: Win32 API vs MFC vs SDK

    Thanks Igor!! You are correct....my concepts are messed up! :P But I'm trying to understand and learn.

    I have previously designed basic GUI's using Java swings and there have been many wizards available to do so. But I did not find any for win32. But since posting the question, I have tried out a few tutorials in plain win32 as well as using mfc.

    About the mfc cobject....I read it somewhere in a tutorial that, "the application is built using plain win32, no mfc objects or functions". But a few lines down, the person wrote that "the application supports some MFC CObject API GetClientRect(), InvalidateRect(), GetParent(), etc."
    So the two statements seemed contradictory to me. Or is it possible to build a plain win32 application and use a limited or selected set of mfc objects?

    Thanks!!

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Win32 API vs MFC vs SDK

    Sorry, but I would recommend to avoid tutorials of this kind. What you need is a solid book that would teach you MFC programming, and after that you find yourself able to tell bullshit from real things. It's very important to adopt proper vocabulary, as terminology really makes a good deal of your way of thinking.
    Best regards,
    Igor

  5. #5
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,923

    Re: Win32 API vs MFC vs SDK

    if you already know c++, then for WIN32 programming I would suggest
    http://www.amazon.co.uk/Programming-...9761597&sr=1-4

    and for MFC
    http://www.amazon.co.uk/Programming-...ref=pd_sim_b_2
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured