Jump to content
  • Advertisement
Sign in to follow this  
Runicode

Beginning Windows Programming

This topic is 3254 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm new to GUI and windows programming, but not new to programming. Can someone recommend an up to date book or two for a beginner to learn some windows GUI programming from the ground up? I am interested in WIN32 and .Net. I'll be using C++. Is there any value in learning WIN32 or is .Net the way to go with Managed C++? Thanks for your help!

Share this post


Link to post
Share on other sites
Advertisement
Hmm... everyone speaks so highly of this book, but it's 11 years old. Will it really be useful for a beginner? Any ideas on C++.net?

Share this post


Link to post
Share on other sites
Quote:
Original post by Runicode
Hmm... everyone speaks so highly of this book, but it's 11 years old. Will it really be useful for a beginner? Any ideas on C++.net?


Win32 pretty much hasn't changed in 11 years. So yeah if you want the bible on Win32 programming that is the book to get. As long as you have a grasp of C (book uses all C style and not C++) then even a beginner can learn a lot from it. But anymore .NET is the way to go if you want to do basic Windows programming. While you can do .NET with C++/CLI, using C# is probably the easier choice to get things going at a decent pace.

Share this post


Link to post
Share on other sites
Quote:

Hmm... everyone speaks so highly of this book, but it's 11 years old. Will it really be useful for a beginner? Any ideas on C++.net?

You mean "C++/CLI," and you want to stay as far away from that as possible. It's not a beginner-friendly language and its main utility is for building interoperability layers between managed and native code -- as stupid_programmer says, you want to use C# if you're going to write managed code.

Share this post


Link to post
Share on other sites
Quote:
Original post by Runicode
Can someone recommend an up to date book or two for a beginner to learn some windows GUI programming from the ground up? I am interested in WIN32 and .Net. I'll be using C++. Is there any value in learning WIN32 or is .Net the way to go with Managed C++?

The .NET variant of C++, C++/CLI, is not C++. For more information, read what C++'s creator, Bjarne Stroustrup, has to say on the matter.
Another vote for C#.NET from me if you're planning on doing .NET development, btw, even if Stroustrup disagrees. >_>

As for Win32? theForger should get you started. Like Petzold, though, the language of choice is C.

Share this post


Link to post
Share on other sites
So a mastery of C would be required to step through the book and recommended resource? Does anyone know of any resources that focus specifically on C++ & WIN32? I have experience with C++, but not C (I know they're similar) and I'm not sure if that will impact how quick I can learn the material.

Share this post


Link to post
Share on other sites
I haven't read it, but I really doubt you don't need a 'mastery' of C to learn the Win32 API from the Petzold book. It will probably just use some aspects of the C Standard Library you probably aren't too familiar with and he probably declares all variables at the start of a function block.

What you should try to do is replace the C-style for more C++-style code. Using const variables in place of macros. std::string for strings when possible. If a Win32 function asks for a buffer try to use std::vector for the buffer. If that buffer is for a null terminated string you can then convert the std::vector buffer to a std::string using the C++ Standard Library.

There are also some tutorials on the internet that describe how to create Window classes that may also be of assistance. Oluseyi wrote an article somewhere on gamedev.net that describe how to do this, for instance.

Share this post


Link to post
Share on other sites
What about MFC, if I read up on MFC would that cover any WIN32 or is MFC on its way out the door? Isn't MFC entirely C++? I guess if I do go with Petzold, I would need approach each section and attempt to understand it from a C++ perspective as you mentioned.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!