Recommend a book on Windows Development

OK. I’m a dyed-in-the-wool Unix developer/DBA who doesn’t know a thing about Windows but is starting to think he should. Most of my professional career so far has been Common Lisp, Java, PL/SQL, and C on Solaris and Linux.

I’m not really interested in “learning a language” or learning to program (although I’d like to use C++ on Windows just to brush up my skills in the language…); it’s the “Windows API” that I’m clueless about and am looking for a good book on. The problem is, there’s a LOT of books on windows development out there, many oriented towards beginners.

Anyone have any suggestions? Normally when I want to learn something new I just read the documentation and expirement, but this is a pretty big jump from what I’m used to…

Do you want to do MFC/COM or .NET? IMHO, MFC programming is a horrible nightmare and requires major brain surgery to do right. .NET is really nice and clean and hides away all the MFC stuff and makes it a breeze to figure out. However, MFC is slightly more compatible and widespread and occasionally, even if you are working in .NET, the MFC under the hood pokes out so it might be worthwhile learning it anyway.

.NET, I learnt in about 2 days just playing around with Visual Studio, theres not really much to learn to get started.

Both, I think. I’m not exactly sure about what .NET is though–is it just a more cleanly designed API, or is it something more, like a virtual machine or a runtime? If .NET is implemented on top of MFC, and MFC is the interface that’s the “closest” to the operating system, I’d want to learn it even if I didn’t end up learning it extensively.

I think my biggest stumbling block is going to be differences in the actual operating system; I understand how to have a process make itself into a daemon on Unix, I’m comfortable with the various non-blocking I/O models, Berkeley sockets, Posix threads (and the Posix system calls in general) but I know there’s some major differences between Unix and Windows, especially in how the kernel implements processes (e.g., no “fork” in Windows).

Maybe two books, one on the operating system (but hopefully written for people who already know something about operating systems…) and one on .NET would be the best way to go?

.NET is a whole bunch of things wrapped up into a big bundle. At it’s core, .NET is an interpreted language called MSIL that is compiled at runtime and run on a virtual machine much like java.

On top of MSIL, .NET languages can be implemented. Currently, C#, J# (.NET Java), Visual Basic.NET, C++.NET, Perl.NET, Fortran.NET and a couple of other languages can be compiled into MSIL. Since all of these compile into the same IL, functions from one language can be called seamlessly from another.

The third part of .NET is the .NET framework which is a common set of libraries that form the basic building blocks of a .NET application. These span from basic things like lists to more advanced things like windows forms which can be used to build GUI apps. Even though .NET calls MFC code in the background, your usually never exposed to it since it’s all wrapped up in the .NET framework.

What exactly do you want to build? Your generic int main(void) applications that are purely command line will behave pretty much exactly the same in both platforms. If you want to build multi-threaded, command line apps, then Windows is POSIX compliant so as long as you use the generic POSIX calls, it should be reasonable easy to translate. If you want to build GUI apps, then you’ll have to learn about the windowing system and event-based programming just as if you would for a linux GUI system, except under a different paradigm.

If you want to interface with pre-.NET code such as DirectX or COM libraries, then you’ll probably need to be familiar with reading MFC code if not writing it.

BTW: The Microsoft Press books are reasonably good, as are O’Reillys. It all depends on how deeply you want to go. Nearly all of my knowledge has just come from playing around and looking through google as well as the MSDN.

Sounds to me like you really want to grab this file, for free - it’s what you need and nothing more.

http://www.borland.com/devsupport/borlandcpp/patches/BC52HLP1.ZIP

Go grab a book by Charles Petzold. He’s basically the Windows book guy. He’s got 'em out on a varity of subject matter - .NET with C#, MFC, pretty much whatever flavor you want. He knows his stuff, he’s been doing it a long time, and he writes pretty good books.

Thanks for the overview, Shalmanese, it was helpful.

This (native GUI apps) is what I’m most interested in by far.

Thanks for the recommendation, Athena. I’ll look over his stuff on Amazon. :slight_smile:

If you’re looking to do C++ programming, I would advise starting out using the Win32 API directly, rather than MFC. MFC is just a thin wrapper around the API, and it’s much easier to use once you have a basic understanding of Win32.

The first thing you’ll need is the Windows Platform SDK. The documentation that comes with it contains all the information you’ll ever need. However, you’ll probably want to start with Petzold’s Programming Windows, which is the canonical book on the topic.

Once you get into it a bit, I also recommend The Old New Thing, an enjoyable blog focused on Win32 programming.

And when you run into problems, the best resource I know of is the Usenet archive at Google Groups, where every conceivable question has already been asked and answered.