Sign in to follow this  
NUCLEAR RABBIT

Beginning Win32 Programming

Recommended Posts

Hello, So I want to learn to do windows programming, and I have been googling for tutorials on the basics, such as how to create a window, but when I do, the sites I find are not much help. I saw this book, and it got a lot of good reviews on it. I was wondering if anyone had this book and thinks its outdated by now. click Also, if you have any good sites for beginning win32 that you think might help me, please let me know. Thanks :]

Share this post


Link to post
Share on other sites
The Petzold book is a great one (it's the one we used in college) for Win32!

It's a bit old, though; The .Net WinForms stuff is so much nicer to use for a typical application. For me, Win32 is still very good to know for the occasions where I need to do something down in the guts of windows that .Net lacks.

It'll also teach you about how to deal with handles (for things like files, icons, brushes, etc) -- even in .Net apps you can leak these resources if you don't understand how to use them.

Share this post


Link to post
Share on other sites
For the purposes of general application development, Win32 itself is outdated. That book however is probably one of the better books you can get for Win32 development.

If you're instead wanting to learn to develop applications, I'd instead recommend looking into something like WinForms.

However, if all you're wanting to do is create a window, MSDN again has the best info on using the Win32 API to do that, such as here for the actual function and here for an example of using it.

EDIT:

Though, as Nypy says, it's still a Good Thing™ to understand.

Share this post


Link to post
Share on other sites
I agree that the Petzold book is a must have if you want to learn Win32 programming. After you look through that book I highly recommend "Programming Applications for Windows" by Jeffrey Richter. It goes very in depth with Win32 and even helps you understand the OS.

http://www.amazon.com/Programming-Applications-Microsoft-Windows-General/dp/1572319968/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1210709895&sr=1-1

Share this post


Link to post
Share on other sites
I am currently programming a Win32 sprite viewer and that book has been about 4 inches away from my mouse hand for about a month now.

If you are looking for a decent site, try this one.

http://winprog.org/tutorial/

Also, keep in mind that you are going to need to ask questions and read up on parts of the Win32 API on the MSDN on your own. Google and MSDN are your friend.

Share this post


Link to post
Share on other sites

2 very good sites are Strom Code
and Function X

once you understand the basic concept of windows programing, MSDN and a little practice will get you everywhere you wanna go.

The Petzold book is very good, i bought it used on amazon, the one beef I have with it is that it spends alot of time in the beginning on things that would be better explored later in the book, but thats just my opinion.

Share this post


Link to post
Share on other sites
I don't have a specific book to offer up, but I would suggest getting at least 1 or 2 books on .NET (for the latest version you can find on Amazon, used books perhaps) and 1 more on Win32.

The reason for this is that nearly every programming book I have read is:

- incomplete
- inaccurate
- confusing

This isn't a dig on any book, but only to point out that the subject matter (even scoped to something like Windows development) is very broad at its base.

I'm not sure what you want from Win32, but I do (as others have) encourage you to check out MSDN.com. MSDN can be incomplete, inaccurate, and confusing to someone new with the site, but I believe that you will eventually find it invaluable once you learn how it works. And, MSDN has taught me a lot about how Windows works.

Share this post


Link to post
Share on other sites
Win32 is necessary because the WinForms abstraction leaks. Until Microsoft builds .NET as a Windows subsystem rather than a runtime (and an incomplete one) running on top of Win32, you'll need to know Win32 for the edge cases.

Petzold's book is good, but don't take everything he says as gospel. Wherever he speaks about software development practices or anything outside of the Windows OS and API, take his comments as merely advisory.

Share this post


Link to post
Share on other sites
Quote:
Original post by valentin-galea
Start here:
About Messages and Message Queues [MSDN]


I don't believe an MSDN article such as this is a good start for someone asking for advice in the beginners section of gamedev. I think the articles you pointed to may be a bit too overwhelming, and hence discouraging, to the OP.

Share this post


Link to post
Share on other sites
Quote:
Original post by argonaut
I don't believe an MSDN article such as this is a good start for someone asking for advice in the beginners section of gamedev.


Have you actually opened the link and looked at it? I think it's quite appropriate for someone just starting with Windows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this