- I've heard good things about Pretzold's(i believe that's the authors name) book, is this book still up to date, or is it outdated? If it is outdated, would you mind recommending other readings to me(feel free to do so even if it is not outdated)?
|No, the book isn't outdated, but some believe the underlying techniques espoused by Petzold might be. I don't feel that way, but some do. I've given my thoughts on the issue here ...|
The only part that might be outdated are the graphics end of things. If you are into fancy graphics, then you'll likely want to use something other than GDI.
|There are so many aspects to this issue thejman that it would be hard to hit them all short of writing a 5000 word disertation on it. I personally prefer WinApi and mostly C'isms in my code. However, taking the 'devil's advocate' role, let me state that there are a lot of plusses to wrappers such as MFC and others. |
For example, some folks believe its not worth it to get too wrapped up in UI code. According to that arguement, 'real' coders should concentrate on the non-visual logic type code that forms the most important part of most serious applications, for example, business logic. According to that arguement, use the easiest framework possible to generate user interface code. Or use the toolkit with the lowest learning curve. Or whatever. If something else comes into vogue in another year or two (and it will), move to that instead. Keep your code modular though - UI code seperate from logic code, so its easy to migrate. Persuing that line of arguement even further, why even use C or C++ to write the user interface, when it can be done so much easier and quicker in Visual Basic, .NET, or a host of others. Something that you'll likely not see written in this or any other C or C++ forum I'll state right now. And that is, that C and C++ are really, really poor choices for writing most Windows programs. In fact, casting about for some worse choice for writting Windows programs, the only thing I can come up with worse than C or C++, Win 32 Api, Petzold style, is assembler. And even that isn't too much harder than straight Petzold style Win32! For example, look at Iczelion's translations of Petzold's programs ...
which can also be obtained from Steve Hutcheson's MASM32 site.
Another issue is that the various wrapper frameworks oftentimes wrap functionality that is hard to learn, for example low level database access using ODBC, or ActiveX/COM. You could easy sink a couple years into learning those. With class frameworks, you can likely throw something together that'll work in a few months.
And if you use class frameworks, you'll reinforce the learning you did in console mode programming regarding usage of classes. You'll see how they are put together using inheritance.
Well, I've just made something of a case for not doing Petzold and Win32 Api.
I do it in spite of all of the above because I look at it as something of a labor of love. I think the way Microsoft built the Windows Api is a thing of immense intellectual beauty. I've dabbled with UI code in other operating systems, and I think its all ugly as sin compared to Windows. Just my opinion, for sure.
I'm actually a firm believer in OOP, but I seldom use a lot of C++ isms. I mostly do my OOP in C because I hate the code bloat C++ gives me. Also, as opposed to likely many here, I tend to shy away from heavy usage of inheritance in my code, preferring encapsulation. As such, my brand of OOP is closer to the COM way of doing things, and I use COM heavily. Well, I gotta go. Hope this help[s.
|i guess i'll just learn MFC and possibly other wrappers such as QT after i'm done with WinAPI as i feel like it would be a good foundation, and give me a lot of understanding (if not more). Thus, when i'm done with regular WinAPI i'll look into MFC and possibly other wrappers.|
The best approach here depends whether you are a "top-down" learner or a "bottom-up" learner.