The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Book recommendation for Windows programming

I'm looking for a book on how to program desktop applications in Windows.  I've actually read several of the standards (Petzold, Prosise), but I'm imagining a book that has a somewhat different flavor.  And perhaps what I'm looking for is actually technical documentation.

I'm not sure if such a thing exists.

Basically, I'd like a book that started off with "Here's what a window is in this context, here's how to write your main event loop, programs communicate by sending messages back and forth."  The basic concepts.  Then it would have a reference section for common controls: "Here are the messages that a ListBox sends, and under what conditions.  Here are the messages you can send to it, and what they do.  Here are the values of lParam and wParam (or the prototypes of the OnXYZ functions) and what the various parameters mean." 

Does anyone know of such a thing?
Michael Gibson Send private email
Wednesday, January 02, 2008
 
 
Are you targeting MFC/Win32? In which case "MFC Internals" is about the only detailed technical level book.
You might also need Add-Wes "Win32 system programming" or "Inside Windows NT" but these don't really cover the gui.
I don't have any deep experience with .Net but Troelsen's book is highly regarded.

Again you are unlikely to get the event loop level of detail because most of the last decade of windows programming has been to try and work at a higher level.

Wednesday, January 02, 2008
 
 
Forgot to add - the MSDN documentation is the only source for what params/messages each function takes. This is sometimees abit confusing and out of date - the intellisense in VS is about the only thing you can beleive since it reads the header files!

ps. Wasn't logged in cos my ****ing anti-virus deleted all my cookies again.
Martin Send private email
Wednesday, January 02, 2008
 
 
You're really not going to find printed books, especially from independent authors, that go into that level of reference information. That kind of stuff is soul-crushing to write and just repeats what's in MSDN already.
Chris Tavares Send private email
Thursday, January 03, 2008
 
 
http://www.amazon.com/Programming-Applications-Microsoft-Windows-General/dp/1572319968

Jeffrey Richter also has a new C++/Windows book out but I don't know what it's like.
Tony Edgecombe Send private email
Thursday, January 03, 2008
 
 
Reference details are on MSDN.  The integrative big-picture view is hard to come by.  Raymond Chen addresses this in his book, but it is a rather anecdotal approach.  Recommended for supplementary reading on how the gazillion pieces actually fit together.
http://www.amazon.com/Old-New-Thing-Development-Throughout/dp/0321440307
Mikkin
Thursday, January 03, 2008
 
 
asmguru62 Send private email
Thursday, January 03, 2008
 
 
Thanks everyone.  I'll check out the recommendations. 

I'm a little surprised that there isn't a standard "big picture" book.  I don't know if I asked the question the right way, but what I'm trying to get at is this: in all the books I've seen, you'll be reading along, and on page 564, it'll say something like "Windows sends a WM_RIGHTCLICKONELEG message to the control's parent when you right click on the control while standing on one leg" and I'm surprised that there isn't a place that spells that out.  If I know that it sends that message, I can use MSDN to look up the syntax of the message, but how am I supposed to know to be on the lookout for the message in the first place?

Something like "Scrollbar sends these controls under these circumstances.  ListBox sends..." and especially "here are the key events in a Window's life cycle from construction to initiation to destruction, and what messages come with them."  It seems like that information is available, but just not organized in any way - it's interspersed in the text all over the place, kind of as it comes up, not in a central, easy to find format.

But again, thanks for all the recommendations.  I'll check them out.
Michael Gibson Send private email
Thursday, January 03, 2008
 
 
Had similar experience trying to learn the win32 API. Sort of like cutting yourself and rubbing salt into the cuts type of feeling.

But considering that managers and customers don't know the difference between win32 api and also .net runtime. Your better off just building the product in .net or java instead. Unless you want to make a killer application or game product that takes advantages of writing near the win32 api.

If your still keen about it all, you can try "the old new thing" blog from raymond who works for Microsoft to see if you can get a better overview.

Good luck.
Entity Send private email
Thursday, January 03, 2008
 
 
> Basically, I'd like a book that started
> off with "Here's what a window is in this
> context, here's how to write your main event
> loop, programs communicate by sending messages
> back and forth."  The basic concepts. 

You've just described the Petzold book ;)

> Then it would have a reference section for
> common controls:

This is all covered by the Microsoft MSDN.
 
There is also the Borland Win32 help file:

http://www.zeusedit.com/forum/viewtopic.php?t=7

It provides a lot of Win32 information without the bloat of the MSDN.
Jussi Jumppanen
Friday, January 04, 2008
 
 
> how am I supposed to know to be on
> the lookout for the message in the
> first place?

There are two tricks that I use:

1: Microsoft groups and names the Windows messages by control/functionality etc so try to learn understand grouping.

2: Use Spy++ to spy the messages. The Spy++ utility also uses this message grouping information in its message filter configuration section.
Jussi Jumppanen
Friday, January 04, 2008
 
 
The Borland Help File for Win32 is old. And I mean VERY OLD! As I found out - it is missing most of new features in XP, so staying with MSDN is a good idea.
asmguru62 Send private email
Friday, January 04, 2008
 
 
Check out Dan Appleman's guide to the Win32 API
accurateData
Saturday, January 05, 2008
 
 
> The Borland Help File for Win32 is old. And I
> mean VERY OLD!

The Win32 is just as old and everything in the help file still applies today.

Anything covered in the Petzold book will also be covered in the help file but in much more detail. So when it comes to learning the basics of Win32 programming, it's a great source of information.

> it is missing most of new features in XP, so staying
> with MSDN is a good idea.

The major problem with the MSDN is the fact that it's just so big and covers more than just the Win32.

Because it's so big, unless you know what you’re looking for it can be difficult to know where to start the search.

Also the search will more likely than not bring back information on things other than Win32 (ie MFC, C#, Vb, C++, etc etc). For someone trying to understand just the basics of Win32 this information overload can very confusing.

The Borland help file is great understanding the basics of Win32 programming just because that's all that the file contains.
Jussi Jumppanen
Monday, January 07, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz