Generally, when commercial software develops to a certain extent, there will be a need for multilingual versions, commonly known as localization. For example, the Traditional Chinese version, English version, and Japanese version. At this time, we need to use Mui files to achieve multi-language software functions.
First, you need to understand that there is a mechanism under wince, that is, when the application software is started, it will find the same name as itself in the current directory (including the applicationProgram(Exe), but the suffix is. XXXX. mui file. XXXX is a four-digit figure with a group leader. The four digits are called lcid, which can be understood as the language ID for the moment. For example, if Simplified Chinese is 0804, traditional Chinese is 0404, english 0409. the lcid rules are complex.Article. If this file cannot be found, the application will use the resource file (RC) compiled into the program at its own compilation ).
So, how to create a Mui file.
The Mui file is actually a DLL file. The difference is that this DLL file does not have any export function, only resource files. Now, if we have an executable file named myexe.exe and want to write a Mui file for it, we need to create a resource-only DLL file in the project, the resource requirements here must include all resources covered by the RC file in the original program, including images, icons, forms, tables (string table) and other resources, in the CPP file, you only need to write a DLL main. After compilation, you can change the name to myexe. EXE. XXXX. mui, and then copy it to the same path as the exe. XXXX is the lcid mentioned above. According to your system settings, if it is simplified Chinese, it is 0804, if it is traditional Chinese, it is 0404, if it is English, it is 0409. note that the resource is used during compilation. the H file must be the same as the file used by the original exe. Otherwise, the program may report an error or crash and cannot run.