How to Learn VC

Source: Internet
Author: User

Many of my friends have asked me this question. Of course, sweating is a must, but at the same time, it will be better if you study in a certain way. Everything is hard at the beginning. In order to help my friends master VC development more quickly, I will share some of my experiences as follows:

1. A good C/C ++ foundation is required. As the saying goes, do not rush to start Windows program development when getting started with VC, but write some character interface programs. The main purpose of doing so is to increase the degree of familiarity with the language, as well as to train your own thinking and be familiar with some mistakes that are often made in programming. More importantly, understanding and using various features of C ++ will be of great help in future development, especially those who use MFC for development must be familiar with C ++.

2. Understand the message mechanism, window handle, and other GUI handles of windows. Measure the test taker's understanding about the APIs that are similar to the functions of various MFC classes.

3. Be sure to understand the role of message ing in MFC.

4. train yourself to use help online instead of reference books when writing code.

5. Remember the meanings of common message names and parameters.

6. Learn to view others' code.

7. Read more books and buy less books. be careful before buying books.

8. Read reference books when you are idle.

9. Come to my homepage. ^ O ^

The following are my personal opinions. You can choose your own method based on your needs and situations.

In addition, I will introduce some principles when selecting reference books:

For beginners: You should select books with comprehensive content, and arrange the content in the books in a reasonable way to achieve a gradual effect when using the book, the code in the book should be explained in detail. Try to buy translation books because these books are generally easy to understand and have easy language. Exercise caution before buying a book. If you buy a book that is not easy to use, it may bring a blow to your learning enthusiasm.

For those who have mastered VC, developers should deepen their understanding of the system principles and technical points. You need to select some books that thoroughly explain the principles so that you can learn more about the new technology. It is best to explain the application of the technology in the book. Try to save money by selecting books with simplified DEMO code.

In addition, it is best to read some supplementary books.

Then I suggest reading a book about the early and High School informatics ausai (some strange ). These books explain the basic algorithms, but they are easy to understand. These things are systematically and strictly explained in the Data Structure course, so you can study them later. However, I think writing some small programs at this stage and implementing some common algorithms will be a good exercise for my own thinking and will be of great benefit to future studies. I think, I can sort the data, find an eight-queen, count it as a tower, and search for depth and breadth first.
  
If you already have some basic programming knowledge, you can skip the above two steps.
  
After you have a certain understanding of programming, you should start to enter C ++. Note that C ++, not VC, is not the same thing! Don't buy VC entry. You certainly don't understand it! C ++ is a language, while the VC tutorial explains how to use the MFC class library. Learning VC should be based on a full understanding of C ++.
  
I think it is better to buy the C ++ tutorial of the university than many colorful books and baby books (Note: Do not buy the grade exam tutorial, which is used for testing ), most of those tutorials have been honed over and over again. They are relatively systematic and contain a great amount of gold and are not too expensive. Here I strongly recommend a "C ++ Programming Tutorial" published by Tsinghua University Press. The cover is red and the back cover is yellow. It looks simple and the editor is Qian Neng. This book is really good and cheap (39.5 yuan ). This book not only tells you the syntax, but also tells you why you want to set the syntax in this way. After reading this book, you will feel that many of the regulations are taken for granted. You don't have to bother to remember them, but it will make a sense of beauty. There are still many practical programming issues in the book, which are of great value. This book is also equipped with "tutorial Guide" and "exercise set", but it is of little use for people with certain programming experience, so I didn't buy it. In addition to this book, I suggest buying another book about the traditional C language, which should focus on the following aspects: Compilation preprocessing, use of typedef, bitwise operation, use of standard library functions (it is best to have a more detailed list for better query ).?
  
C ++'s standard template is a good stuff, but it is not helpful for learning MFC, because MFC is too backward (^_^), you can put it first, do you want to make a decision when you get the MFC ready. Although I have never learned it, I think it is quite good and represents a development direction. Although it is hard to learn (it seems like a little c ++, it is simply learning a new language), but mastering it can make programming much easier .?
  
After learning C ++, should I learn VC? Don't worry. First, look for a Win32 programming book. This time, I don't have to pay attention to it. It's almost the same. It's cheaper. If you have an introduction to the VC integration environment, it's best. Windows is used for Win32 programming? API programming, MFC is a class library that encapsulates a large number of API functions, which is convenient to use. However, without some API programming basics, you do not know the relevant concepts, it may be difficult to learn MFC. Believe me, you will not feel that learning API programming is a waste of time in the future. More than two thousand API functions must be exhausted. In fact, you only need to know how to create a window, dialog box, control, and message loop, and understand the meaning of the handle. It is better to know a little about GDI programming. The key to this stage is to understand how Win32 programs operate and grasp the relationship between various windows. Because you should rarely use Win32 directly in the future? The key to programming with the SDK is to understand the overall structure and remember several functions. The function can be queried now. We should have a comprehensive copy of the information at hand. The Chinese API function book seems to only have? VB, but it seems there should be no obstacle. It is available in msdn, which is comprehensive and more detailed than Chinese. I suggest you use Chinese documents for quick search. If you have any questions, try again in English. (I forgot where I downloaded my html version of the Chinese API book, but I sold it in a bookstore. It's very expensive. Who wants to contact my iamsor@sohu.com )?
  
For those who want to learn game programming, note: from now on, you don't have to learn any MFC anymore. Believe me, it is useless except for a headache. All Games use Win32? Compiled by the SDK. Now you want to learn DirectX. I recommend the DirectDraw document translated by Lao Wang (www.imagic3d.com). I have some basic knowledge written by Lao Wang, which is very suitable for beginners ,? I would like to thank Lao Wang for his hard work. I also bought a copy of DirectX? 7? Quick tutorial, published by the Mechanical Industry Publishing House. The cover is in red. In addition to poor translation, it is quite good. The introduction is quite comprehensive, and there are some basic game programming knowledge. If you want to save time, you can consider using the wind soul game library compiled by Yunfeng, which is very convenient (www.codingnow.com? Thank you for your hard work ). however, I still recommend that you at least know about DirectX. here, many of my friends complained that they could not find any books related to DirectX. I will tell you, don't go to programming books, or go to multimedia production books, but also big and round eyes. Director ..? Director ..? DirectX !!! You know, I don't have a good eye for anyone who works in the bookstore. I just found out one day when I had nothing to worry about. It gave me a big jump. After discovering this secret, I found that there are actually a lot of books about DirectX, but the average person cannot find them. After learning DirectX, you can start to struggle, and the rest of the problem is to accumulate experience .?
  
For those who wish to be application software, they have laid the foundation and now all the obstacles to entering VC have been cleared. However, we still need to make full ideological preparations, so things won't be so smooth. At the beginning, you have to face a bottleneck, a lot of closely related knowledge, so that you have to understand a whole, and it is very difficult to come a little bit. It can be said that the most difficult thing to learn VC is the beginning. The scenario is similar to the long program that you face when creating the window for the first time, but it is worse. Many people are stuck by a large group of knowledge here and give up learning. In fact, this is almost a major feature of Windows programming. You should have some experience in Win32 programming, while DirectX and COM both have similar problems. Remember, be sure to firmly believe that, after breaking through this bottleneck, It is a sea of sky, and you will be able to break through with a solid foundation.

My suggestion is that you should not read the next sentence until you fully understand it. Instead, you should read it as if it was the case. You can also read it without understanding it, after making a menu or dialog box, you can read it again. After several times, you can probably understand the operation of the MFC program. Note: There is a key here. Be sure to carefully understand the spirit of object-oriented programming and try to associate the current program with the knowledge you have learned. By comparing the differences between member functions and corresponding API functions, we try to understand how MFC encapsulates related APIs. For example, a considerable number of classes encapsulate handles and omit them when passing parameters. This is an important feature. There are a lot of Macros in MFC, And it looks strange, but you don't have to worry about its implementation method, as long as you know how to use it, this is also very important. In addition, do not rely too much on classwizard. You must analyze the generated code by yourself. If you are lazy, you cannot really understand MFC.

 

 

Comment: Now I think about how I spent my four years in college. When I went to college, I only knew console programming. Why did I learn C ++ hard? I really didn't use C ++ to implement what we wanted to do.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.