The subject pretty much says it all. I’m fairly competant at C/C++ programming. However, putting it to use in a Windows environment is something I know little about. I’ve been browsing around the web, and found a few small tutorials, but nothing more comprehensive. Are there any good C++ tutorial sites out there that have Windows-specific (messages and all that fun stuff) tutorials?
Also, does anyone have any recommendations on books that would cover this same subject? I’ve browsed through various bookstores, and the sheer number of titles is pretty overwhelming. I need to seperate the wheat from the chaff, as it were.
I don’t know about websites, but you might want to check out books specifically on Visual C++. I know there’s a ton of them. I have one called “Inside Visual C++” that’s pretty good.
Other than that, you’re sort of SOL. The disturbing trend lately is that whenever someone puts out a new API, all the docs and/or books about it use VB examples. It’s not impossible to translate it into C++, but a hassle.
the “definitive” resource (though not necessarily the most friendly) for all things Visual C++ (assuming you’re using VC++ since you’re under WindowS) is of course msdn.microsoft.com. If you’re feeling rich you can even subscribe to MSDN and get it on CD/DVD - it contains exhaustive documentation of the Windows API and the C++ language (although as pointed out previously, it does tend towards VB).
If you’re into COM, check out http://www.develop.com - the legendary Don Box works there and there’s tons of good technical advice on the pages. http://www.devx.com and http://www.codeguru.com also have good examples. Also check out the newsgroups - there is one called something ilke comp.lang.vc++ - if you don’t have a news server/news reader software you can get there through http://www.deja.com.
Also, the discussion groups at discuss.microsoft.com offer a lot of interesting perspectives ( DCOM and ATL are relevant to what you are doing, I assume )
I used the book [url href= “http://www.amazon.com/exec/obidos/search-handle-form/103-1649177-5193441”]SAMS Teach Yourself Visual C++ 6 in 21 days. (I obviously haven’t figured out yet how to make a proper link in the boards. Can anybody point me to an explanation? Until I get edumicated, please cut & paste.)
It starts with the assumption you already know C++ and goes from there, giving a pretty good intro to programming in Windows. Each lesson covers some area specific to Windows and takes and hour or two. I found the explanations to be particularly good because it often explains why things are done as well as how.
Forget Petzold. It’s outdated, and uses the API. What you really want is the sequel, also by MSPress, called Programming Windows with MFC by Jeff Prosise. It’s the Petzold of MFC, and makes everything much, much easier.
The thing is, it kinda makes a difference whether you’re looking to do win32 or MFC programming. Just in case you don’t know, win32 allows you to do stuff like get directory information and other OS-type stuff, whereas MFC allows fancy GUIs. Of course, that’s oversimplified by a lot.
When it comes to the win32 API, MSDN makes for a great reference, but it helps to have a book of some kind if you’re just getting started–there are a lot of different parts to the API, and searching it can be a bit difficult.
I haven’t done a lot of MFC stuff, so I can’t really recommend anything. However, MSDN is once again a great reference.
It may be dated, but knowing the Win32 API is not with out merit. MFC is not with out its flaws, and knowing the direct API can be extremely helpful in circumventing them. An experianced C++ programmer looking to learn windows programming would have good reason to wish to learn the underlying structure.
“Though the source code is written in C here for widest available audience, the programming strategies and technical information is applicable to C++ programming as well.”
Try http://www.informit.com
They have tons of online (and free) books on learning C++ and they have the added advantage that they’re searchable. Free registration required (a bogus name will work).