When I come in to learn SDK programming, I feel that many things are not systematic. Good information found on the Internet.
First push: http://blog.csdn.net/beyondcode. the combination of the api series is quite incorrect.
The second place is the SDK programming compiled by xiaoya, xuexue.com. http://www.quanxue.cn/jc_clanguage/sdkindex.html;
Charles Petzold wrote windows program design, which is the most famous windows program design book on the earth;
The fourth place is http://www.functionx.com/win32/lesson01.htm, which provides a detailed tutorial;
Yang xiangjin, the fifth author of the "windows program design tutorial", summarized the "windows program design", but it still works.
Explanation of a related question:
1. the function of registerclass is used to notify the system. You need to define a new form type and record the type to the system, then you can use createwindow to create a form based on this type. All forms based on this type have the same attributes, such as the background color, cursor, and icon.
For the dialog box, the system has registered its own type, so you do not need to call registerclass, you can use dialogbox to display the modal dialog box, use createdialog to create a non-Modal Dialog Box
For the control, the system has registered the type of the dialog box, so you do not need to call registerclass to use createwindow to create the control, and the first parameter in createwindow, it is the lpszclassname member in the wndclass structure used by the registerclass function.
The difference between a widget and a dialog box is that the form process of a dialog box is provided by the calling program, while the form process of a widget is defined in the system. You must subclass the form, to customize the message processing logic of the control.
2. To put it bluntly, inheritance has been supported as early as the windows programming age of C language, which laid the foundation for the future implementation of C ++. The registerclass function defines a form class. Compared with the class concept in C ++, The createwindow function defines objects of this type, relative to the Object Concept in C ++.
3. When you use the createwindow function, if the ws_visible flag is specified, you do not need to call the showwindow function to display the form. Otherwise, you must use the showwindow function. The updatewindow function sends a wm_paint message to the form process, allowing the form to be drawn immediately after creation. If the updatewindow function is not available, the wm_paint is returned only when the visible area of the form changes after it is created.