(There are a lot of programming languages ??under Windows, so people often ask on BBS: What programming language should I use? Among them, there is a recognized answer: real programmers use VisualC . Indeed, VisualC is a powerful, sensitive and convenient programming tool, which can terminate commands that other programming languages ??cannot terminate, allowing programmers to easily implement their own designs and indulge their creativity. The powerful functions of VisualC benefit from the characteristics of C , and more importantly, it has the MFC class library with complete system, sensitive mechanism and rich functions. Therefore, to talk about VisualC , it is necessary to talk about the MFC class library. The class library of MFC can be divided into two levels, the first is the central MFC class library that realizes the MFC programming structure system, and then the extended class library built on the basis of the central MFC class library, for example, the class library that supports COM and realizes network functions class library, etc. With the continuous upgrading of VisualC , the functions of the MFC class library are more and more rich and powerful. However, the MFC central class library is relatively stable, especially from VisualC 4.2 to the present VisualC 6.0. The center of this book is to analyze the MFC class library in an easy-to-understand manner, analyze how to use the MFC class library and the internal implementation of the MFC class library, lift the messy and difficult veil of MFC, and let readers have a comprehensive, thorough and clear understanding of MFC. understand. Regarding the central realization of MFC, there are mainly the following aspects. First of all, MFC uses the object-oriented features of C to encapsulate Windows objects and Win32 functions, which hides the complexity of the underlying Win32 to a certain extent. Secondly, MFC chooses the method of message mapping to manage Windows messages and events, which hides the window process of Windows windows and simplifies the clutter and tediousness of message management. Also, MFC provides a document-centric programming model, and implements a document-centric programming structure, which simplifies the process of data management. Moreover, MFC proposes module status, thread status and module thread status to support multi-threaded programming and DLL programming. This book commented on the above content from the viewpoint of using MFC and the viewpoint of internal design and implementation of MFC, and analyzed the design and implementation of MFC center; The contents of the relevant chapters are as follows:Chapter 1, MFC overview. The second chapter explains MFC's encapsulation of Win32API and Windows objects, reviews the use of various MFC objects, and analyzes the relationship between MFC objects and Windows objects. The third chapter, comment on the characteristics and implementation of CObject, including dynamic class information, dynamic creation, the realization of serialization and so on. The fourth chapter reviews the message mapping mechanism of MFC, analyzes the management of various messages in MFC, such as the management of Windows messages, control notification messages, command messages, status update messages, reflection messages, etc.; and reminds MFC to use message mapping techniques Implement the principle of C virtual function mechanism. Chapters 5 and 6, analyze the MFC programming structure to start and close a process of using a program, remind the inside story of the MFC structure, analyze the process of creating a document-view-based user program centered on the document template, and show the MFC structure management message and Opportunities and places to call virtual functions. The seventh, eighth and ninth chapters introduce the concepts of MFC's dynamic link library, process, thread, etc., as well as the types and use of MFC dynamic link library, and comment on the problems of multi-thread programming under MFC. And further discuss one of the central concepts of MFC: status (module status, thread status, module thread status), reminding MFC to support multithreading mechanism, MFC realizes the inside story of regular DLL and extended DLL. The tenth chapter discusses the debugging method under MFC. Chapter 11, commenting on the CFile class, firstly analyzes the use of CFile and its encapsulation of Win32 file functions. The twelfth chapter, commenting on modal and modeless dialog boxes, analyzes how MFC designs and implements the functions of these two dialog boxes, and analyzes the virtual functions and message management functions designed by CDialog and CFormView to realize related functions. The thirteenth chapter, reviews the design and implementation of MFC toolbar and status bar, analyzes how MFC derives CStatusBar, CToolBar, CDialogBar and other subclasses based on CControlBar, and realizes the standard management of MFC toolbar and status bar. Chapter 14, reviews MFC's Socket class. The first chapter to the tenth chapter introduced the central concept and realization of MFC. On this basis, chapters 11 to 14 comment on the realization of some common classes in MFC. The content of this book is very helpful to the abecedarian of MFC (preferably have some understanding to VisualC and Windows) and those who raise. If you are a beginner, you can read Chapters 1-6. The primary intent is to develop a comprehensive understanding of MFC and how the MFC structure supports programmer programming. If there is a place that cannot be cleaned up, you can skip it and directly read the conclusion of the relevant analysis. Especially Chapters 5 and 6)