Archived

This topic is now archived and is closed to further replies.

Foeyshell

How can I start C++ windows programming?

Recommended Posts

Foeyshell    122
I have taken C++ programming classes. As well, I have taken data structure (C++) in school. But all of my previous C++ programming experience are console based C++ programming. But now, I want to do some windows (form) programming by using C++. From my friends, I get to know that there are MFC, Win32, ATL programming for windows (form) applications. But I really want to know which one (MFC or Win32 or ATL) is good for me to start Windows (form or graphic) programming? (I had lots of experience in windows form programming by using C#, but I have no idea in C++''s world). Could any C++ guru give me some hint? and Where can I start for C++ windows programming?

Share this post


Link to post
Share on other sites
Drazgal    368
Well MFC is a wrapper for win32 so imo you should learn win32 before using MFC (as I did) but then again other prefer to elarn it the other way around (especially if you are very comfortable with OOP).

Win32 is a bugger to get working in true OOP (you need methods called message handlers which need to be static so if you want a non static you need a linked list of all windows and start deriving blah blah......) but for programmers who prefer working in procedures then its great.

MFC is quite clean and once you know it well allows very quick application development (but not as fast as visual basic would but then again you get more power with c++).

Try www.winprog.org for win32
and www.thecodeproject.com for MFC stuff

Deadpan Studios

Share this post


Link to post
Share on other sites
Foeyshell    122
Thank you man. From your post, I found I may start from MFC since I think I''m comfortable with OOP from my previous C# programming. So do you recommend any MFC books for me to get start?

Share this post


Link to post
Share on other sites
Xiachunyi    556
Also as a humble suggestion, I think you should learn some basic Win32 API so you have a "hint" on what is going on (abstractly)when you code a window. Just my suggestion.

Also, good luck

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You are right. Not just let "drag and drop" create "windows".

Share this post


Link to post
Share on other sites
alnite    3436
or try .NET. It is a LOT easier than MFC. But it''s .NET though, which mean it''s managed C++, and if you want to run your program on Joe''s computer, you need to make sure that .NET Framework is installed.

If you decide to learn MFC, I''d suggest that you learn Win32 API first. It may be harder to pick up and tedious (i.e you need so many setup before even creating a window). But you will understand what''s going on behind everything.

For MFC book, check out a book by Jeff Prosise, it''s called "Programming Windows with MFC" if I am not mistaken. It''s on its 2nd edition.

For Win32 API book, try Charles Petzold''s book, "Programming Windows." 5th edition I think is the latest one.


Reasons I don''t learn MFC is first because of its naming convention. Second, it rely heavily on AppWizard, which is not what I am looking for. Almost every MFC book out there will start with AppWizard. So, it is like "WTF? Tell me what MFC is and show me how to make a window! Not AppWizard!" If you are such a newbie, why would they introduce you to AppWizard that will give you code that you don''t even know what to do next? Sure they explain it later, but I don''t like to see that much code when I start learning.

Share this post


Link to post
Share on other sites
dmikesell    157
If you want a much cleaner easier to use Windows OO framework, I''d strongly suggest looking at Borland CPP Builder and its VCL (Visual Component Library). It makes for true drag-n-drop Windows development. You drag and drop a component and write the member function code for the events you want to handle.

The only drawback is that it''s not used nearly as much in industry, so if you''re trying to build job skills it may not be the best choice. But if you''re just doing this on your own (as I am), I''d choose VCL over MFC any day of the week.

--
Dave Mikesell Software & Consulting

Share this post


Link to post
Share on other sites