VC ++ detailed study notes-how Windows runs

Source: Internet
Author: User

1. API: Application Programming Interface, ApplicationProgramInterface. Developed for Microsoft, you can use msdn to check its usage.

2. Win32 SDK: Software developement kit, a 32-bit platform software development kit, is a collection of resources required for development. Includes API functions, help documents, and some auxiliary development tools provided by Microsoft.

3. Window: An application must have at least one window. In Windows applications, windows are identified by window handles (hwnd. To operate a window, you must first obtain its handle.

4. Handle: it is an important concept of a Windows program and is frequently used. In a Windows program, there are various resources (Windows, icons, cursors, and so on). When creating these resources, the system allocates memory for them and returns the ID number that identifies these resources, handle. Windows handle (hwnd), icon handle (hicon), and image brush handle (hbrush.

5. Message: Windows program design is an event-driven program design mode, mainly message-based. For example, when a user draws a picture in a window, when the left mouse button is pressed, the operating system will perceive this event, so the event is encapsulated into a message, the application delivers the message to the peer column of the application, and then the application extracts the message from the message queue and responds. In this process, the operating system also sends messages to applications. The so-called message sending means that the operating system calls a function in the application to process messages, this function is called a window process. The message is defined as follows: typedef struct tagmsg {
Hwnd;
Uint message;
Wparam;
Lparam;
DWORD time;
Point pt;
} MSG, * PMSG;

 

 

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.