How Windows Internal programs work

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.