1 , mutual relation diagram
The operating system provides functions that it can perform in the form of functions that are called by the application to these functions. The collection of these functions is the programming interface that the Windows operating system provides to the application application Programming Interface ( i.e. Windwos API)
2 , message mechanism
typedefstruct Tagmsg (HWND hwnd,//Handle to window, type of Windows identityUINT umsg,//unsigned int denotes a specific message (WM start WM_KEYDOWN (Microsoft defined macro))WPARAM WPARAM,//Integer, info addition, defines a new type to differentiate the purpose of a variable from the type of the variableLPARAM LPARAM,//integral type, info additionDWORD time,//The Word type is a 16-bit integer DWORD (double), 32 bits, indicating when the message was postedPoint PT//The point structure (x, y) indicates the position of a cursor when the message is posted. ) MSG;
Handle ( Unique identification number per resource ) : Operating System management and operating resources are all based on the handle to find the corresponding resource.
divided by Type: Icon handle Hicon, cursor Hcursor, window HWND, Application Instance hinstance .
3 , Message Queuing
Each application has a message queue, which is a FIFO buffer.
4 , message response
The corresponding processing behavior when the operating system receives the message.
with VC Write Windows Application Requirements: 1 , understanding the message itself 2 , let the operating system respond to messages
How Windows Internal programs work