"Programming Windows" notes 1

xiaoxiao2021-03-06  62

Written in front

I want to explain some friends when I start this book. Many people tell me that I am inappropriate at the beginning, some people have complained with me "The C Programming Language is too difficult. "C Primer" is too thick. There are some basic, and so on. First of all, I don't know what these so-called foundations are? The above materials are all basis, even if it is completely mastered, it is just a little fur, I don't know what extent. In addition, I absolutely oppose the so-called basic textbooks, especially C and C , which are read like our university. (Other I have no experience, it is estimated that it is not that). Those books usually mistaken, leave a very bad thinking habit for beginners, read them, want to learn in-depth learning is not easy, but it is more difficult. Once the bad habits become, it is bad, and the "Programming Windows" in front of us is also the foundation of the Windows program design, of course, fully understand this book. It is not too far from the WINDOWS programming expert, but don't worry about the basic issue (why it will mention it here), ok, this is a simple explanation, and I do my study idea. Aunt, as the preface to this note,

Chapter One

When starting to enter a field, we often need to answer a few questions that must be answered, and the first chapter of this book exists to answer these questions. Below is my understanding of these answeressions.

Why choose Windows API as the beginning of learning Windows programming? As the author mentioned at the beginning, C and APIs are not the only way of writing procedures under Windows, and they seem to be the most troublesome, the most original approach, but it is because it is the most original way. It can provide you with the most flexible design environment, master it, in the Windows environment, you can almost do what you want, the "heart method" in martial arts is probably this. In addition, it should be admitted that the author has seen the MFC for a while, although there is not much difficulty, but every word is sincere and fearful, I don't know how to write down these CODEs, just as JJhou said: " But I don't know how the principle is not high. "So wanting to know the principle, the API is your way of you.

What is the foundation?

Let us first look at what the author has said, will use Windows 98? (Will WINDOWS XP can be? ...) Probably joking; will C language? Of course, I can't expect C and use the API (I am very suspicious that I don't understand C will consider this "32-bit compiler? I think it is not necessarily VC , other Compiler, I used DEV C to compile the Code at the end of this chapter. It is good to run, and individuals think as long as you have a file called Windows.h in your compiler installation directory, of course, you must remember, you must be a 32 compiler (unloaded TC.). We can see that there is almost no foundation for us, it is confidence, patience and challenge. What is DLL?

Before learning the API, we must first understand this concept, and understand this concept, we must know what happened when LINK is? Before writing this text, I thought that Link was just assembled into an executable file, but this is just the first step, we know that there are some functions in the C library belong to the runtime function. These functions can be compiled into execution code in Win32, and then connect to execute files (DLL files or exe files), which do not enter the point (such as a maim function), which means he can only be The program is called, which is the so-called Dynamic Linking Library, so you must understand that it is not a direct result of the compiler. It is also a product of LINK, so the second step of Link finally runs the program, which is the second link of these DLLs. This is the core of the Windows running mechanism. Of course, it is still very important here. Friends can view the information, understand it is very important for learning APIs. What is the API? How is it called?

People who write the console program with C know that the write program is largely Library application and design, whether it is design or application that must be based on system calls provided by the system. API is the system call function provided by Windows. (It can be understood as a runtime function library of C). He provides a programming interface for all Windows applications, and he and the C standard library function is identical from the perspective of use. The API provides a DLL interface that is not in your program, but in the form of a DLL in the system (in the Win32 environment, C's runtime correspondence library is also DLL) Way-connected). In addition, you must also know that the Windows API function is mainly composed of kernel, user, and gdi, so the program that cannot be said is not a Windows program, the graphical interface is a part of the Windows program, and it is also seen that the GUI program is found in the history of Windows. Not a unique feature of Windows.

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

New Post(0)