#1
  1. Web Developer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Location
    Pennsylvania
    Posts
    171
    Rep Power
    0

    Win32 API w/ C++


    Does anyone know of any good beginner tutorials on the Win32 API?

    I am experienced in writing command line C++ applications, and I am looking to expand to graphical Win apps.

    I noticed that Visual C++ has a few help topics regarding the API, but I do not like those ones - I am picky.

    I know this doesnt fit in this forum, but I noticed that the Win API is all OOP, and I am not that experienced with OOP, so if you know any good OOP tutorials, post them.

    Thanks.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    USA
    Posts
    286
    Rep Power
    13
    For people getting into Windows programming, I always recommend two books:

    Programming Windows by Charles Petzold (Win32 API)

    Programming Windows with MFC by Jeff Prosise (MFC)

    FYI, the Win32 API uses C, whereas MFC is an OO wrapper of the API written in C++.

    Start with the Petzold book to get a firm understanding of the underlying API, then move onto MFC.
    Jon Sagara

    "Me fail English? That's unpossible!"
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    3
    Rep Power
    0
    Heh,

    Don't bother with any online tutorials of the WIN 32 API, they aren't any good ones.... Well, maybe a few beginner ones but, you won't find any use out of them....

    Just search for "windows API tutorial" with google to find them

    -cARL
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    3
    Rep Power
    0
    Also, that book Programming Windows by Charles Petzold (Win32 API) is pretty good...

    After a few minutes, I had my unanswered question answered. What did WINAPI stand for in int WINAPI WinMain([..]) (forgive me if I messed up somewhere with that, I'm still really new to everything windows API)

    -cARL
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Bulgaria
    Posts
    22
    Rep Power
    0
    See your header files for WINAPI. It is defined as _stdcall. It is the same as PASCAL, APIENTRY, FAR PASCAL, CDECL. It is just a calling convention in Windows programs. Over the time different are used, and now they are mantained for backward compatibility.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Bulgaria
    Posts
    22
    Rep Power
    0
    No, the Windows API is not OOPin terms of C++. It is written entirely in C, but in an object oriented manner. OOP is not C++ or another technology. It is a paradigm. if you learn the API and are accustomed to C++ and objects you should stick with the C thinking of the world, handles, structures, macros, defines, etc. Petzold is excellent, but you should check for Platform SDK in the MSDN.
  12. #7
  13. jasondoucette.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    378
    Rep Power
    12
    Originally posted by jonsagara
    Programming Windows by Charles Petzold (Win32 API)
    I highly recommend this, as well. I also agree with jonsagara's suggestion to learn the win32 API before moving to MFC.

IMN logo majestic logo threadwatch logo seochat tools logo