   Windows API tutorial recommendations?
  Hey all, I'm lookin for a good place to start learnin the Windows API, but all the tutorials I find seem to be directed towards C; I'm curious if there are any recommended actually towards C++ that you all might know that would be more effective.  I realize the similarities between the languages and that 90% of what those tutorials would translate, but I'd feel more comfortable with something directed actually towards someone using C++ (In particular Visual C++ 2010).  Also, I considered MSDN, but from the way it's described as the Holy Grail of programming information, I figured delving into it may be a bit of an information overload for someone who's just learning terms like "Handles", Macros and typedefs.  (lol)Note: Which brings me to another issue; I started to read a WinAPI tutorial, which told me to completely understand Macros, then I read macro info and it tells me that I should avoid them at all cost in C++... which leads me to believe that a C-based WinAPI tutorial probably isn't the best solution for someone using C++.  Thanks!   
  Well, the Win32 API is not a trivial thing to learn, and the API is mainly exposed as a set of C functions. But there are samples out there (just take them all with a mountain of salt), and MSDN is a good reference for figuring out what each function does.Macros are macros are macros. Biggest problem with them is that they have no name-scoping, as such they tend to just overwrite things willy nilly mchilly.   ;  I thought you wanted to make a small game? Why are you focusing on Win32 all of a sudden?   ;  Because as part of the making small games approach goes, I'm going to follow all the basic steps.According to the GameDev.net resources, the best course to start developing games is something extremely simple, like Tetris, then slowly move into other, increasingly difficult projects, like Brickbreaker, then pacman, then side-scrollers, etc.  I figure that while I'm getting a novice group together to work on a small game, i'm going to run through all these things and essentially gain experience in the process.So, I go along through the resources, and read up a bit on some Tetris information...  Well, of course I could follow the tutorials and it'd work fine, and I could take away what I wanted to learn from it.  But that's not me.  I'm not happy with just knowing that "Do this blindly,a nd it'll make you a Window that you run tetris on."  I want to know WHY it works and HOW.  So, here I am with Windows API. Plus, I figure since DirectX is Mircosoft based, knowing Windows API would likely be a benefit in the long run.   ;  Win32 is a C API. The reason you're not finding a lot of introductory material dealing with using C++, incorporating classes, polymorphism, etc., to aid in Win32 programming is because this is not an introductory topic. It's perfectly possible to wrap Win32 with C++ -- MFC, for instance, is Microsoft's C++ wrapper around Win32 -- but doing it yourself is not a task for a beginner.Now, if you want to use C++ features and write native Windows applications you could of course look for tutorials on learning MFC; however, I really really don't recommend doing this. It would be a waste of your time. MFC is like someone's crazy old uncle who was cool when he was young but now is drooling on himself in the nursing home and who also wasn't actually all that cool when he was young (but I digress).If you want to get a good handle on Win32 programming, just get a copy of Charles Petzold's _Programming Windows_ -- people always say this but it really is that simple. Petzold's book will be at any decent library. If you just want to understand Win32 programming so that you can write a Tetris type game using the GDI without cutting-and-pasting a bunch of boilerplate that you don't understand, just read the first four or five chapters.   ;  I'll definitely check it out.  But, for advance reference, is this the type of source to explain *what* the functions are doing, like the "how it works" information?   ;Quote:Original post by DotNetDevBut, for advance reference, is this the type of source to explain *what* the functions are doing, like the "how it works" information?Not necessarily. Petzold is more about 'get things done' than about 'how things work'. The advanced reference for Win32 API would be MSDN library, which you will spent hours digging through if you're serious about this.   ;  Charles Petzold's book is quite good. I use it to look at examples if I'm not happy with what they have on MSDN. Though MSDN covers a lot more advanced topics aswell, such as creating dialog templates in memory, rather than using a resource editor. A good intro would be the forger's win32 API tutorials: http://www.winprog.org/tutorial/Still, you should be comfortable with C, and you will see a lot of stuff that looks weird. Stuff like LPDLGTEMPLATE as a type name. You'll have to get used to this notation, and it couldn't hurt to bookmark the msdn page that shows all the typedefs for the windows data types. That helped me quite a lot.As for a handle...it's just a pointer to void. You don't really know what the system does with it in detail, simply because, you don't need to know. All the built in winAPI functions take care of that. You just pass handles around so you can then pass them to the windows functions, so it can do what it needs to do.   ;  I concur with recommendations of Programming Windows by Charles Petzold. This book goes over the basics of Win32 api programming, with a focus on basic GUI programming. For a deeper look into Windows, I recommend Advanced Windows by Jeff Richter (the price of used versions of that book can't be beat!) or the retitled 4th edition of that book, Programming Applications for Microsoft Windows, which relies more on C++ (the earlier book is all C). These books provide goes over the basics of threads, memory management, dlls, the windows messaging system and more. It's probably also a good idea to pick up a book about Windows systems programming, that is, the non-GUI parts of the Win32 Api. For example, Windows System Programming. I haven't looked at that particular book, so I can't recommend it. I have a copy of Win32 System Services. It's o.k. Lots of code examples but it's details are shallow compared with Richter's books. For a really deep look into Windows, Inside Microsoft Windows 2000 by Solomon and Russinovich. I haven't seen their latest version of that book Windows® Internals, but those two have a solid reputation, so it's likely quite useful. "Inside Windows" isn't a programming book. It doesn't contain code examples. It's a top to bottom overview of Windows as an operating system. It goes into the details of the kernel and what happens inside it. It's probably more than you need now, but keep the reference in the back of your mind for a time when you're ready for that level of knowledge about Windows. It's the kind of book you'll want to get if you ever decide to write a device driver.  At any rate, if you're not happy with the tutorials at winprog.org and demand tuts using C++, check out Windows API Tutorial.   ;Quote:Original post by DotNetDevI'll definitely check it out.  But, for advance reference, is this the type of source to explain *what* the functions are doing, like the "how it works" information?Programming Windows is a 1500 page tutorial with really good documentation [wow]