Windows input method programming (on)

zhaozj2021-02-16  51

Chapter 1 Basic Principle of Chinese Character Input Method under Windows9x System

The Chinese character input method under the Windows system is actually converted into a national or Chinese string in a certain coding rule, enters the destination. Because the application is different, the user cannot design the conversion program itself, so the Chinese characters will naturally fall into Windows system management.

First, the relationship between input method and system

Keyboard Event Application | | Windows User.exe | Input Law Manager | Input Method

After the system's keyboard event has Windows User.exe software, user.exe is transmitted to the input method in the input method in the input method in the Input Method Manager, the Manager, the Manager, the INPUT METHOD MANAGER, the input method. According to the user-coded dictionary, the translation keyboard event is the corresponding Chinese character (or Chinese character string), and then reverse in User.exe, user.exe will pass the translated keyboard event to the currently running application, to complete the Chinese character input of.

Second, the composition of the Chinese character input method

The name of the Chinese character input method in the Microsoft Windows 9x system is "Input Method Editor", referred to as IME, the program name of the input method is: *. IME, the data file name address * .mb, ie, the normally input method coding table (dictionary).

In fact, IME file is a dynamic connection library program (DLL), which is different from DLL files, but the name is different.

The general Chinese character input method consists of three windows:

Status Windows - Displays the current input method (Chinese or English information);

Code Enter Windows - Displays the current hit button;

Chinese character selection window (Candidates Windows) listing all Chinese characters (strings) currently available for users to choose or query.

The above three windows are managed by the basic user interface function.

Now we use dumpbin.exe to open Microsoft's Pinyin input method (windows / system / winpy.ime) to see what it makes up (here a Windows98 is an example, and assumes that the Windows system is installed under C: disk):

C: / dumpbin c: /windows/system/winpy.ime

Microsoft (R) Coff Binary File Dumper Version 6.00.8168Copyright (C) Microsoft Corp 1992-1998. All Rights Reserved.

Dump of file winpy.ime

FILE TYPE: DLL // IME actual DLL program

Section Contains the Following Exports for WinPy.ime

0 Characteristics 34a37323 Time Date Stamp Fri Dec 26 17:04:35 19970.00 Version1 Ordinal Base19 Number of Functions / / A total of 19 number of names // Corresponding 19 names

Ordinal Hint Rva Name

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

New Post(0)