Home Operation and Maintenance Windows Operation and Maintenance Detailed introduction to the basics of SDK

Detailed introduction to the basics of SDK

Jun 10, 2017 am 10:37 AM

1. Keyboard message 1. Keyboard message WM_KEYDOWN - generated when a keyboard key is pressed. WM_KEYUP - generated when a keyboard key pops up. WM_SYSKEYDOWN - generated when the system key is pressed, such as ALT, F10, etc. WM_SYSKEUP - generated when the system is released WM_CHAR - character message 2. Message parameters: Key message: WPARAM - VirtualKey of the key (virtual key code) LPARAM - - Parameters of the button, such as the number of times pressed WM_CHAR:WPARAM - Input characters (ASCII encoding) LPARAM - Related parameters of the button 3. Use of messages: (1) KEYDOWN can repeat the message, KEYUP can only be released after the button is released Appears once (2) TranslateMessage When converting the WM_KEYDOWN message, WM_CHAR can be generated for visible characters, but there is no such message for invisible characters. 2. Mouse messages 1. Basic mouse messages WM_LBUTTONDOWN - WM_LBUTTONUP when the left mouse button is pressed

1. Win32 SDK Basics (13) Detailed introduction to keyboard and mouse messages

Detailed introduction to the basics of SDK

Introduction: 1. Keyboard message 1. Keyboard message WM_KEYDOWN - generated when a keyboard key is pressed. WM_KEYUP - generated when a keyboard key pops up. WM_SYSKEYDOWN - generated when the system key is pressed, such as ALT, F10, etc. WM_SYSKEUP - generated when the system is released WM_CHAR - character message 2. Message parameters: Key message: WPARAM - VirtualKey of the key (virtual key code) LPARAM -

2. Win32 SDK Basics (Twelve) Processing of WM_PAINT Message (Figure)

Detailed introduction to the basics of SDK

Introduction: 1. Introduction In a computer, almost everything displayed on the screen is drawn, including windows, dialog boxes, pictures, and all text, and the WM_PAINT message is Messages triggered by the system when drawing these objects. Almost every operation we perform on the computer will trigger this message, and it is also one of the most important messages in WIndows. This article focuses on experimenting with this message for a comprehensive study. 2. Basics of WM_PAINT 2.1 Macro definition #define WM_PAIN

3. Win32 SDK Basics (11) Detailed explanation of message queue and GetMessage/PeekMessage, SendMessage/Postmesage

Detailed introduction to the basics of SDK

Introduction: 1. Message Queue 1.1 Message Queue Message queue is a queue used to store messages. Messages are stored in the queue In first-in-first-out mode, all window programs have message queues, and the program can obtain messages from the queue. 1.2 Types of message queues System message queue: A message queue maintained by the operating system, which stores messages generated by the system, such as mouse and keyboard messages, etc. Program message queue: a message queue belonging to each application (thread), maintained by the application.

4. Win32 SDK Basics (10) Detailed explanation of several common Windows message processing sample codes

Detailed introduction to the basics of SDK

Introduction: An introduction This article mainly introduces the processing of several common Windows messages. In "Win32 SDK Basics (8) - Windows Message Mechanism", we introduced For the processing of WM_CREATE message, before the window is created, we use the message processing function to pop up a MessageBox. Based on this, this article introduces other common Windows messages such as WM_DESTROY, WM_SYSCOMMAND, WM_QUIT, WM_SIZE and so on. First, we introduce the summary of Windows common messages in

5. Win32 SDK Basics (9)

Detailed introduction to the basics of SDK

Introduction: 1. Windows message distribution message range description 0 ~ WM_USER – 1 system message WM_USER ~ 0x7FFF custom window class integer message WM_APP ~ 0xBFFF application custom message 0xC000 ~

6. Win32 SDK Basics (8) Detailed explanation of Windows message mechanism (picture)

Detailed introduction to the basics of SDK

Introduction: 1. What is a message? Before explaining what a message is, let us first discuss the execution mechanism of the program. Generally speaking, programs can be divided into two categories according to their execution mechanisms: the first category is process-driven. For example, the C program we wrote when we first came into contact with programming, or the microcontroller program. This type of program often has a pre-set execution process, and when we execute it, we just execute it step by step; the second type is event-driven. I believe everyone can understand this incident. The occurrence of each event is random, and each event will have its own moment, similar to events in life.

7 in the program. Win32 SDK Basics (7) Example of how to create a sub-window of a window

Detailed introduction to the basics of SDK

Introduction: What is a child window? When we click a button in a Windows window, such as clicking the close button of the window, a window will often pop up to prompt relevant information. A pop-up window like this is a sub-window of the main window. When we create a child window, we also use the CreateWindow or CreateWindowEx API. Let’s take a look at the function prototype of CreateWindow: HWND WINAPI CreateWindow(_In_opt_ LPCTSTR

8. Win32 SDK Basics (6) Detailed explanation of the window class search process and related API

Detailed introduction to the basics of SDK

Introduction: 1. The search process of window classes In the previous article, we introduced the three window classes of the windows system ——System window class, global window class and local window class. Each window class has a different scope in the operating system, and the window class name registered in each scope cannot be repeated when creating a window. , global and local scopes are searched according to the window class name. The search process is summarized as follows: (1) The operating system searches in the local window class according to the incoming window class name. If it is found, execute step 2. If it is not found, execute step 2. 3 steps. (2

9. Win32 SDK Basics (5) A brief introduction to the window class

Detailed introduction to the basics of SDK

##Introduction: 1. Introduction In the previous article, we created a window from scratch. One of the most important steps is to register the window class, such as the following code. ://Register window class BOOL Register(LPSTR lpClassName, WNDPROC wndProc){ WNDCLASSEX wce = { 0 }; wce.cbSize = sizeof(wce); wce.cbClsExtra =

10. Win32 SDK Basics (4) The second step of how to create a windows window from scratch

Detailed introduction to the basics of SDK

Introduction: 3.5 Display window. After creating the window, if we want to see the window when running, we also need to explicitly set the display window: ShowWindow(hWnd, SW_SHOW);UpdateWindow(hWnd); ShowWindow and UpdateWindow are both system API, the former is to set the display properties of the window. The latter is to re-update the window properties. Only after the update, the properties will take effect. Our WinMain.

The above is the detailed content of Detailed introduction to the basics of SDK. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of how to open APK files on your computer Detailed explanation of how to open APK files on your computer Jan 02, 2024 pm 10:09 PM

Users sometimes download apk files on their computers. The apk file can actually be the format of the installation file on the mobile phone. It is still very easy to use. If you want to know, come and check out the detailed tutorial. Let’s go~ How to open apk file on computer: 1. First, you need to find your own apk file. 2. Then right-click the file and select "Rename". 3. Then change the suffix to "zip". 4. Then right-click the changed file and select "Extract to xx file". 5. Wait until the decompression is complete to open the file.

Detailed introduction to the location of the win11 virtual machine? Detailed introduction to the location of the win11 virtual machine? Jan 16, 2024 pm 08:00 PM

In win11, many friends want to use other operating systems through virtual machines, but they don’t know where the win11 virtual machine is. In fact, we only need to download a virtual machine software. Where is the win11 virtual machine: 1. Virtual machine platform 1. If we want to enable the virtual machine platform function, just click on the "Start Menu" first 2. Then search above and open "Turn on or off Windows features" 3. After turning it on, check Select "Hyper-V" and click "OK" to save. 2. Virtual machine 1. If we want to use a virtual machine similar to an emulator. 2. Then just download a "VMware" virtual machine software. If we want to use VMware, we also need to enable the above virtual machine

An in-depth analysis of the meaning of Bluetooth 5.3 An in-depth analysis of the meaning of Bluetooth 5.3 Jan 13, 2024 am 09:03 AM

Nowadays, more and more users are using mobile phones. I believe they are familiar with Bluetooth, which existed nearly 10 years ago. However, few people know the differences between the various versions of Bluetooth. So what does Bluetooth 5.3 mean? What does Bluetooth 5.3 mean? Answer: Bluetooth 5.3 is the 5.3 version of Bluetooth, where Bluetooth is a short-range wireless communication technology. 1. Bluetooth is characterized by short distance, fast speed and stable signal. 2. Devices that support Bluetooth can complete data transfer without being connected to the Internet. 3. Compared with the previous generation of Bluetooth, the 5.3 version of Bluetooth has faster transmission speed and longer range. 4. At the same time, the power consumption of Bluetooth before version 4.0 was higher, while Bluetooth 5.3 has lower power consumption and is easier to use. 5. Today, Bluetooth is not only used in

Detailed introduction to whether Windows 11 supports fourth-generation CPUs Detailed introduction to whether Windows 11 supports fourth-generation CPUs Jan 06, 2024 am 08:07 AM

Among the CPU support models previously announced by Microsoft, the lowest support is Intel's eighth-generation processor. However, many users of fourth-generation CPUs say that their hardware configuration clearly meets the requirements of win11, but they cannot upgrade to win11. In fact, it can be upgraded. But other methods are needed. Can the fourth generation CPU be upgraded to win11? Answer: It can be upgraded, but you need to skip the system detection. 1. Although there is no name of the fourth generation CPU in the CPU support list previously announced by Microsoft. 2. However, this does not mean that it cannot be upgraded, it just cannot be directly upgraded during system upgrade. 3. As long as the minimum configuration requirements of win11 are met, we can run the win11 system normally. 4. We can skip system detection

Where is the win10 update file? Detailed introduction Where is the win10 update file? Detailed introduction Jan 06, 2024 pm 09:40 PM

The default file location of win10 update files is generally fixed, but there are some differences. Many users want to delete the update files after upgrading the system, but cannot find them. Let's take a look at the location introduction. Where is the win10 update file: A: The win10 update file is in: C:\Windows\SoftwareDistribution\. After the update is successful, if you want to clean up related content, you can try using the disk cleanup function. But be careful when deleting, don't delete important system files, otherwise malfunctions may occur. How to delete update files in win10: 1. If you want to delete update files, it is recommended to right-click the c drive, open "Properties" and select "Disk Cleanup" 2

Detailed explanation of how to use Huawei Computer Manager win11 and its functions Detailed explanation of how to use Huawei Computer Manager win11 and its functions Jan 05, 2024 pm 12:11 PM

Huawei Computer Manager is a software that Huawei users like to use very much. It can quickly manage our mobile phones by connecting the computer and mobile phone. It can also complete the screencasting of the mobile phone and play with the mobile phone on the computer. However, many friends don’t know whether Huawei Computer Manager win11 can be used after updating win11. Let’s take a look together. Can Huawei Computer Manager win11 be used? Answer: It can be used, but there are some key issues. 1. Huawei Computer Manager can be installed normally and run stably in win11 system. 2. However, the interface will be offset on win11, and some buttons cannot be used outside the screen. 3. We can try to download and install the latest version of Huawei Computer Manager to see if the problem can be solved. 4. If you are installing the latest version of Huawei

Exploring the functions of the Linux kernel: a detailed introduction to the five major parts Exploring the functions of the Linux kernel: a detailed introduction to the five major parts Mar 21, 2024 am 09:57 AM

As the core part of the operating system, the Linux kernel is responsible for important functions such as managing hardware resources and providing system calls. This article will delve into the five major parts of the Linux kernel, including process management, file system, network communication, device driver and memory management, and provide a detailed introduction and code examples. 1. Process Management Process Creation In the Linux kernel, process creation is implemented through the fork() system call. Here is a simple example code: #include

Detailed introduction to whether win11 can play Eternal Calamity Detailed introduction to whether win11 can play Eternal Calamity Dec 27, 2023 pm 06:29 PM

Eternal Calamity is a recently launched martial arts battle royale game with beautiful and moving character designs, cool and smooth action performance, and an exciting competitive experience. So whether the latest win11 system can play this latest game, let the editor take you to take a look. Can Eternal Calamity be played on win11: Answer: Can Eternal Calamity be played on win11. 1. According to player tests, win11 can run the game Yongjie Wujian normally and stably. 2. However, this game has relatively high configuration requirements, and players with relatively low configurations may not be able to play it normally. 3. We can briefly take a look at the configuration requirements for this game on Steam. Because this game is generally optimized, it is recommended to achieve the recommendation if you want a smooth experience.

See all articles