Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows GUI C++ Programming

I want to learn C++ GUI programming using Visual Studio 2008. I'm not sure where to start though. I learned C++ in high school, but not GUI. I've been doing C# for about 3 years now and thats how I "learned" GUI programming. Now I want to learn how to write GUI's without the use of the .NET framework, so where do I start?

like image 955
Kredns Avatar asked Feb 28 '09 00:02

Kredns


3 Answers

Charles Petzold's "Programming Windows 5th Edition" is the Bible for Windows programming.

http://www.charlespetzold.com/pw5/

like image 124
BobbyShaftoe Avatar answered Oct 17 '22 22:10

BobbyShaftoe


Since you say you've been doing C# GUI programming for about 3 years, I'll assume that means Windows Forms. One way to dip your toe in the water is to remember that WinForms is really just an object-oriented wrapper around user32. So load up Reflector and take a look at the way some of the controls are implemented. You'll see that these strange messages like WM_PAINT and WM_KEYDOWN are pumped to the WndProc of the various controls by Windows. In plain old Win32 or MFC programming, the same thing is still going on. Doing this will let you slowly peel back the layers of the onion; you'll get a better feel for how Windows Forms works, too. From there, I'd recommend picking up Programming Windows by Petzold; it's old, but the native APIs in Windows don't move around that much. Have fun!

like image 8
Nicholas Piasecki Avatar answered Oct 18 '22 00:10

Nicholas Piasecki


MFC is almost outdated now. I would recommend to use WTL instead .

Well it is also not a good idea just to start programming for GUI in C++ when there are so many good frameworks available like QT cross platform framework.

like image 7
anand Avatar answered Oct 17 '22 22:10

anand