Win32 learning notes
Author: Jiang Xuezhe (netsail0@163.net) materials: Windows programming (fifth edition), Peking University Press, [the United States] Charles Petzold with the Beijing Science and Technology Development Co., Ltd. Bo Yan translated ¥: 160 Environment: windows2000 server Internet Explorer 6.0 DirectX7 .0 Visual C 6.0
(Tunjiang computer program preparation group copyright, reproduced please explain)
After learning the C language, I face two options. One is C , the other is Win32. I decided to learn Win32 first. It is said that the book written by Charles Petzold is the authority in the field, so I don't hesitate to pick up one hundred and sixty oceans. The cover of the book is very good, I feel that it is a good book, the lower right corner has the red bottom white character: "Microsoft Press", cool! Microsoft has always been my favorite company. The quality of paper is also very good, I feel that there is no white flower.
After I bought the book, I urgently wanted to see where this book was authoritative. The first feeling given to me after turning the book is ---- halo ~, although written in C, I don't understand! First of all is the dead int winapi Winmain (), and the four parameters of WinMain (). What are this? I am familiar with
Int main (int Argc, char * argv)
where it goes? ? ? Is this a C language? Look down and look down again, it is a boring foot! Output a paragraph of string is messagebox ()! Where is my printf ()? Why do every string uses text () enclose? ? Give me a reason! ! ! ! ! Also said this is this book for beginners. Is my water in the "beginners"? At that time, I found that it is definitely my C language level is not too customs!
Later, it was used to these codes. It turns out that the C language under windows is this. Unlike standard c, the C port under WidNows is WinMain (). As for WinAPI, defined in WINDEF.H as follows:
#define winapi __stdcall
For beginners can be there. Messagebox () is Windows API! ! ! That is, the application interface provided by Windows. His function is to display a message in a small window.
In short, the C with the standard C under Windows is not quite the same. Microsoft has changed it even C language dad. ^ _________ ^.
Because the content of the original book is already very detailed, I have to do it can only be more detailed. Because I wrote in the process of learning, it may be impossible, welcome criticism, I change!
Tony nonsense.
------------------ 2003.2