I was looking into programming applications, some minor graphics and such. I still consider myself a newbie at the console based c++. Is it halfway easy to pick up on the windows type stuff without knowing all the basic c++ type stuff. If so, is there any recommendations as far as to where to start? Thanks in advance.
I recommend a strong understanding of console programming before undertaking the task of learning the Win32 API. This is just my opinion, others may agree/disagree. If you do want to look into the API try this site it may help.
Okay, here is my MFC adventure.
I started out learning C++. C++ remains the only programming language I have learned and use. My goal has always been to develope programs for Windows. I knew at one point I will have to begin learning either MFC, Borland, Qt, or Win32 API. I remember posting messages asking members about MFC and Win32 API and trying to decide what I should start with. I decided on MFC because Win32 API was too difficult at the time.
My first venture with MFC began with Programming Windows with MFC Second Edition by Jeff Prosise. At first glance after I received that reference from Amazon was that MFC was way too complicated. Heck, there was too many code I had no idea about, which I later learned was AppWizard and ClassWizard generated code. Anyways, I began reading Prosise's book hoping to program Windows quickly. I was wrong. I was not able to learn, understand, and put to use the key concepts Prosise presents in the book. Approximately a month later I reached chapter 9, which is where Prosise introduces Doc/View architecture. I was excited because I knew that was going to be the breakthrough point where I will learn the tool to program Windows easily.
Doc/View was easy because AppWizard generates a skeletal program that you can compile and run immediately. However as I soon found out, I still have to program all aspects of the program from text, menu, toolbar, buttons, windows, views, etc. The bottomline was that I was not ready to develope a Windows program. In fact, I was nowhere near that level of experience or even understanding of MFC to develope my first project.
At that point I lost confidence. I thought MFC was too difficult. I posted a message on boards asking members concepts about Doc/View that all MFC programmers must know. I thought of quiting. Then decided to give MFC one more attempt because I saw that *MFC code was easy C++, it is the MFC generated code that really confused me*. I put Programming Windows with MFC Second Edition aside and bought *Introduction to Programmng MFC with Visual C++ by Richard Jones*. *It was the wises decision and became an important reason I made a breakthrough with MFC*.
Here is my advice:
- Start learning MFC via *Introduction to Programmng MFC with Visual C++ by Richard Jones* first
Richard Jones wrote an incredible introduction to MFC. He explains everything in a very concise, simple, and easy way to understand. His teaching technique is more effective to programmers of all levels because he explains and shows the transition from core C++ to MFC. You will see a gradual change from core C++ to MFC. That is one *key element to learning MFC and Windows programming*.
- Do all or as many exercises that from Introduction to Programmng MFC with Visual C++. Finish all exercises no matter how "stupid" or "tedious" you may think of them. The most important element to learning MFC as well as all real world programming including gaming, Win32 API, Winsock, and COM is *practice*. You have to programming!
*Do not start out learning MFC via Programming Windows with MFC Second Edition by Jeff Prosise* Start out with *Introduction to Programmng MFC with Visual C++ by Richard Jones* first.
- Once you are done reading and doing all exercises from Jones' book, start thinking about beginning your own projects. Remember, think big. Try to consider a project that involves many messages so you will gain experience with the way Windows handles messages. I recommend a text editor.
- Now you are ready for Programming Windows with MFC Second Edition by Jeff Prosise. It is an unparalleled MFC *reference*. You will at one point or another need to look up something from Prosise's book. There are no exceptions! Buy it, read it, and keep it as a reference. In fact, I honestly feel that all MFC programmers should have a copy of it. It is to MFC as Programming Windows by Charles Petzold is to Win32 API.
Follow the steps above and with an open mind and desire to become a decent Windows MFC programmers, I believe you will master the fundamentals of MFC without three months or less. Again, you must practice. I highly recommend that you do all exercises from Jones' book. I highly recommend that you start your own projects as soon as possible. One reason is when you start your own project, you will get an understanding of many MFC tools. You will gain experience. If you need help, post on forums. There are many experienced programmers that can and will help you. I recommend the following forums for *programming*:
Do not lose hope. Have confidence and practice, practice, and practice!
Very nice post Kuphryn,
I agree - it's (Win32, MFC) is difficult to learn. Even moreso for the n00b (I'm one) with out extensive knowledge of simple C++ (console). I just completed my first project, with the help of some locals here on the board, and I did learn a great bit. I've still much to learn before I can make a program of half-decent use however :)
Hmm now to find that Richard Jones book.. :)
I find MFC code to be very un-organized and all over the place. I use straight API, but i might learn some MFC ... someday.
A great online tutorial is: http://www.winprog.org/tutorial/ and there is a good reference with the file name Win32 C++.hlp in DualCatfish's sig.
For Win32 API, MFC, and C++ in general, I highly recommend books over tutorials. You can *always* use good references. Plus, books are more effective motivators for two reasons. Books are there for you at any given moment and you are more prone to want to finish reading books and doing the practice exercises. Ultimately, you will learn more from books than from tutorials for broad subjects such as C++, Win32 API, and MFC.
Yeah i've been looking around and from what i've read, i think i've decided on going with the win32 api. I also did some looking around and think i'm going to go with Petzold's Windows Programming book, as I have heard many a great comment on this board. I appreciate all of your help.