Mui Program (Vista or above)

Source: Internet
Author: User
Tags intl
A) Transform existing projects:

Another article,How to support Mui (Multi User Interface) for both Vista and XP

Http://hi.baidu.com/harbinzju/blog/item/e67c1018514026bc4aedbccd.html

1. Change the Lauguage of the corresponding resource in the existing. RC file to en-us.

2. Compile Mui. rcconfig and add it to the project. The file is in XML format, for example:

<? XML version = "1.0" encoding = "UTF-8"?>
<Localization>
<Resources>
<Win32resources filetype = "system"> // according to msdn, the field value is always "application "? However, this is correct and the source is not found.
<Localizedresources>
<Resourcetype
Typenameid = "#6"
/>
</Localizedresources>
</Win32resources>
</Resources>
</Localization>

The meaning of the above content is to use string resources as language-related resources, which will be generated in multiple resource files. See msdn

The http://msdn.microsoft.com/library/dd319100 (vs.85). aspx

The following are the standard resource types and their numeric identifiers :( will the resource type be localized ?)

  • Cursor (1)
  • Bitmap (2)
  • Icon (3)
  • Menu (4)
  • Dialog (5)
  • String (6)
  • Fontdir (7)
  • Font (8)
  • Accelerators (9)
  • Rcdata (10)
  • Messagetable (11)
  • Group_cursor (12)
  • Group_icon (14)
  • Version (16)
  • HTML (23)

 

2. Add the additional options in command line of resources in project properties

/R/FM "$ (intdir)"/helloplugin. muires/Q Mui. rcconfig, replace helloplugin with "% (filename)" as shown below )"

In this step, the resources in the localizedresources section in Mui. rcconfig are generated into a muires file.

 

3. Add the following content to command line in post-build event in project properties:

Rem ** extra steps to link the Mui files **
If not exist "$ (targetdir)" MD "$ (outdir )"
If not exist "$ (targetdir) $ (projectname)" MD "$ (targetdir) $ (projectname )"
If not exist "$ (targetdir) $ (projectname)"/en-us md "$ (targetdir) $ (projectname)"/en-US
Link.exe/out: "$ (targetdir) $ (projectname)/en-US/templates (targetnamecmd.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"
Note: The predefined Macros in different project files may be modified accordingly. The following describes the specific meaning of each sentence:

Rem ** extra steps to link the Mui files **

Comment statement
If not exist "$ (targetdir)" MD "$ (outdir )"

If $ (targetdir) does not exist, create it
If not exist "$ (targetdir) $ (projectname)" MD "$ (targetdir) $ (projectname )"

If $ (targetdir) $ (projectname) does not exist, create it
If not exist "$ (targetdir) $ (projectname)"/en-us md "$ (targetdir) $ (projectname)"/en-US

If "$ (targetdir) $ (projectname)"/en-US does not exist, create it
Link.exe/out: "$ (targetdir) $ (projectname)/en-US/templates (targetnamecmd.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"

Link muires to the target file


4. Rebuild Project

 

 


 

B) create projects in different languages:

 

1. Create a static library project. For convenience, set the project name to the language name.

Refer to the MS-help: // Ms. lhsmssdk.1033/ms. lhswinsdk.1033/Intl/nls_238z.htm in msdn, And Locale identifier constants and strings for the name of the project.

For example, to make a library of French (France), the name is FR-FR, to make a Japanese library, the name is JA-JP.

2. create a new RC file and add the resources of a) project. In this example, all string resources are added to RC. Note that the resource IDs must be consistent, the only difference is the string content. Do not forget to select launguage as the corresponding language.

3. Add Mui. rcconfig in a) to this project.

4.Add additional options in command line of resources in project properties

/R/FM "$ (intdir)"/helloplugin. muires/Q Mui. rcconfig

5. Add the command line in post-build event in Project Properties

Rem ** extra steps to link the Mui files **
If not exist "$ (targetdir)" MD "$ (outdir )"
If not exist "$ (targetdir)/helloplugin/$ (projectname)" MD "$ (targetdir)/helloplugin/$ (projectname )"
If not exist "$ (targetdir)/helloplugin/$ (projectname)" MD "$ (targetdir)/helloplugin/$ (projectname )"
Link.exe/out: "$ (targetdir)/helloplugin/$ (projectname)/helloplugin.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"

Rem ** copy checksum from language neutral to Mui file **
Echo "cmd(targetdir#helloplugin.exe"
Echo "$ (targetdir)/helloplugin/$ (projectname)/helloplugin.exe. Mui"
Muirct-c "(targetdir)helloplugin.exe"-e "$ (targetdir) helloplugin/$ (projectname)/helloplugin.exe. Mui"
Note: More muirct items are provided here than a). This item will test and add the muiresource of this language to helloplugin.exe. This is very important; otherwise, the corresponding resources will not be obtained.

 

 

The final binary result is as follows:

| _ Debug

| _Helloplugin.exe

| _ En-US

| _Helloplugin.exe. Mui

|-FR-FR

| _Helloplugin.exe. Mui

 

 

Reference: http://code.msdn.microsoft.com/MUIIzer, which has a few documents detailed each step of the production, this article is to refer to it to complete. you can also use the muiizer tool to automatically generate the corresponding Mui project, but it may need to be installed. net Framework 3.5, I tried to generate it once, and then it always went wrong, saying that a COM object could not be created. It is estimated that I did not install it. net Framework 3.5.

 

Another article,How to support Mui (Multi User Interface) for both Vista and XP

Http://hi.baidu.com/harbinzju/blog/item/e67c1018514026bc4aedbccd.html

1. Change the Lauguage of the corresponding resource in the existing. RC file to en-us.

2. Compile Mui. rcconfig and add it to the project. The file is in XML format, for example:

<? XML version = "1.0" encoding = "UTF-8"?>
<Localization>
<Resources>
<Win32resources filetype = "system"> // according to msdn, the field value is always "application "? However, this is correct and the source is not found.
<Localizedresources>
<Resourcetype
Typenameid = "#6"
/>
</Localizedresources>
</Win32resources>
</Resources>
</Localization>

The meaning of the above content is to use string resources as language-related resources, which will be generated in multiple resource files. See msdn

The http://msdn.microsoft.com/library/dd319100 (vs.85). aspx

The following are the standard resource types and their numeric identifiers :( will the resource type be localized ?)

  • Cursor (1)
  • Bitmap (2)
  • Icon (3)
  • Menu (4)
  • Dialog (5)
  • String (6)
  • Fontdir (7)
  • Font (8)
  • Accelerators (9)
  • Rcdata (10)
  • Messagetable (11)
  • Group_cursor (12)
  • Group_icon (14)
  • Version (16)
  • HTML (23)

 

2. Add the additional options in command line of resources in project properties

/R/FM "$ (intdir)"/helloplugin. muires/Q Mui. rcconfig, replace helloplugin with "% (filename)" as shown below )"

In this step, the resources in the localizedresources section in Mui. rcconfig are generated into a muires file.

 

3. Add the following content to command line in post-build event in project properties:

Rem ** extra steps to link the Mui files **
If not exist "$ (targetdir)" MD "$ (outdir )"
If not exist "$ (targetdir) $ (projectname)" MD "$ (targetdir) $ (projectname )"
If not exist "$ (targetdir) $ (projectname)"/en-us md "$ (targetdir) $ (projectname)"/en-US
Link.exe/out: "$ (targetdir) $ (projectname)/en-US/templates (targetnamecmd.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"
Note: The predefined Macros in different project files may be modified accordingly. The following describes the specific meaning of each sentence:

Rem ** extra steps to link the Mui files **

Comment statement
If not exist "$ (targetdir)" MD "$ (outdir )"

If $ (targetdir) does not exist, create it
If not exist "$ (targetdir) $ (projectname)" MD "$ (targetdir) $ (projectname )"

If $ (targetdir) $ (projectname) does not exist, create it
If not exist "$ (targetdir) $ (projectname)"/en-us md "$ (targetdir) $ (projectname)"/en-US

If "$ (targetdir) $ (projectname)"/en-US does not exist, create it
Link.exe/out: "$ (targetdir) $ (projectname)/en-US/templates (targetnamecmd.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"

Link muires to the target file


4. Rebuild Project

 

 


 

B) create projects in different languages:

 

1. Create a static library project. For convenience, set the project name to the language name.

Refer to the MS-help: // Ms. lhsmssdk.1033/ms. lhswinsdk.1033/Intl/nls_238z.htm in msdn, And Locale identifier constants and strings for the name of the project.

For example, to make a library of French (France), the name is FR-FR, to make a Japanese library, the name is JA-JP.

2. create a new RC file and add the resources of a) project. In this example, all string resources are added to RC. Note that the resource IDs must be consistent, the only difference is the string content. Do not forget to select launguage as the corresponding language.

3. Add Mui. rcconfig in a) to this project.

4.Add additional options in command line of resources in project properties

/R/FM "$ (intdir)"/helloplugin. muires/Q Mui. rcconfig

5. Add the command line in post-build event in Project Properties

Rem ** extra steps to link the Mui files **
If not exist "$ (targetdir)" MD "$ (outdir )"
If not exist "$ (targetdir)/helloplugin/$ (projectname)" MD "$ (targetdir)/helloplugin/$ (projectname )"
If not exist "$ (targetdir)/helloplugin/$ (projectname)" MD "$ (targetdir)/helloplugin/$ (projectname )"
Link.exe/out: "$ (targetdir)/helloplugin/$ (projectname)/helloplugin.exe. mui "/dll/noentry/machine: x86" $ (intdir)/$ (targetname ). muires"

Rem ** copy checksum from language neutral to Mui file **
Echo "cmd(targetdir#helloplugin.exe"
Echo "$ (targetdir)/helloplugin/$ (projectname)/helloplugin.exe. Mui"
Muirct-c "(targetdir)helloplugin.exe"-e "$ (targetdir) helloplugin/$ (projectname)/helloplugin.exe. Mui"
Note: More muirct items are provided here than a). This item will test and add the muiresource of this language to helloplugin.exe. This is very important; otherwise, the corresponding resources will not be obtained.

 

 

The final binary result is as follows:

| _ Debug

| _Helloplugin.exe

| _ En-US

| _Helloplugin.exe. Mui

|-FR-FR

| _Helloplugin.exe. Mui

 

 

Reference: http://code.msdn.microsoft.com/MUIIzer, which has a few documents detailed each step of the production, this article is to refer to it to complete. you can also use the muiizer tool to automatically generate the corresponding Mui project, but it may need to be installed. net Framework 3.5, I tried to generate it once, and then it always went wrong, saying that a COM object could not be created. It is estimated that I did not install it. net Framework 3.5.

 

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.