"In-depth light-out MFC" learning notes

xiaoxiao2021-03-06  40

--- "simple terms MFC" one of the authors study notes: XGM RRC.BIT record in 2001-8-10 Gong Jianwei comment: This study notes, though not systematic exposition of a problem, but to read people feel learned a lot, Whether you are old bird or a rookie, you will agree. I hope that XGM will continue to write down, watching "in-depth shallow MFC" to see these notes, and there is also the "deep-depth shallow MFC" of the new feelings, "in-depth shallow MFC" is a good book, I have a certain C basics and a little on VC. Perceptive VC beginners who know know them come into contact with this book. It should be said that this book is not really suitable for beginners like me, but read the book, there are still some gains, only part of the part, as a learning note. 1. Install VC , why should I install Internet Explorer? (Is many old birds don't know, Mr. Hou Junjie is to know, but also to know the same, 5555555555 ............) Because Microsoft's Visual Tools (including Visual C , Visual Basic, Visual FoxPro, Visual J , Visual InterDev, etc. are centralized by so-called Visual Studio management, and these tools have a great goal, which is to help develop Internet applications, so they hope to be with IE. 2. SDK: Software Development Kit originally referred to software development tool, but now there is a proprietary noun, and the program written by Windows RAW API is often referred to as an SDK program. Some people also call the Windows API as the SDK API. 3. Construction function of different types of objects (the first execution of the object after birth and the function of automatically execute) and the destructive function (the object line will be destroyed, but the time before, but not destroyed, the final implementation and automatically execute functions) execution timing comparison as follows:

The global object local object static object When the object constructor constructor generated by the NEW is executed (earlier than the program entry point earlier), the execution program process will execute the execution program to execute the program process to leave the object. Performed at the end, but the destructor than the global object is taken. Objects are executed by DELETE 4. C is not a purebred object-oriented language (SMALLTALK and JAVA are only).

Therefore, there is a global function that does not belong to any class, and they all start in the function name, and I don't mean. It is just to make a loud name, AF, Application Framework, is common Afx global function: AfxBeginThread: start a new thread AfxEndThread: the end of an old thread AfxFormatString1: printf-like format string generally AfxFormatString2: printf-like format string generally AfxMessageBox: similar to the Windows API function MessageBoxAfxOuputDebugString: character String to the decentralizable device AFXGETAPP: Get an Application Object (CWINAPP derived object) pointer AFXGETMAINWND: Get the program main window Pointer AFXGETITISTANCE: Get the program's Instance Handle 5. MFC Data Type The following is the data type BOOL common to Win32 program : Boolean value, value for true or falsebstr: 32-bit character pointer BYTE: 8-bit integer, no positive or negative colorRef: 32-bit value, representing a color value DWORD: 32-bit integer, no positive and negative No. Long: 32-bit integer, with positive negative LPARAM: 32-bit integer, a parameter lpcstr: 32-bit pointer to a window function or a callback function, pointing to a constant string LPSTR: 32-bit pointer, pointing to a character String LPCTSTR: 32-bit pointer, pointing to a constant string, this string can be ported to the Unicode and DBCSLPTSTR: 32-bit pointer, pointing to a string, this string can be ported to the Unicode and dbcslpvoid: 32-bit pointer, pointing A data LPRESULT: 32-bit value, a return value of a window function or a Callback function, is a 16-bit unpigneous number integer in Win16, and a 32-bit unpredictable in Win32. Negative number, WNDPROC: 32-bit pointer, pointing to a window function word: 16-bit integer, unpaired wPARAM: window function or a parameter of the callback function, 16-bit in Win16, in Win32 32-bit below these is the unique data type of MFC Position: a value, representing Collection Objects (such as array or linked list) are often used in MFC Collection classes (ie data processing classes, such as carray) LPCRect: 32-bit pointers, pointing to a constant RECT structure 6. Strange window name AFX: B : 14AE: 6: 3E8F When viewing the name of the window class with SPY (a tool attached to VC ), the window class name will be discovered to become like AFX: B: 14AE: 6: 3E8F this strange look? It turned out that Application Framework converted the name of the window class to AFX :: x: Y:

转载请注明原文地址:https://www.9cbs.com/read-51369.html

New Post(0)