Udostępnij za pośrednictwem


Unires Sample: Demonstrates the Use of Unicode Resource Files

The Unires sample demonstrates how to create a Win32 application with only Unicode string resources and how to integrate a Unicode .rc file into a project. As the resource editor only supports ANSI in Visual Studio .NET, modifications to the .rc file have to be made in the source editor.

Security noteSecurity Note:

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

To get samples and instructions for installing them:

  • On the Visual Studio Help menu, click Samples.

    For more information, see Visual Studio Samples.

  • The most recent version and complete list of samples is available online from the Visual Studio 2008 Samples page.

  • You can also locate samples on your computer's hard disk. By default, samples and a Readme file are copied into a folder under \Program Files\Visual Studio 9.0\Samples\. For Express editions of Visual Studio, all samples are located online.

Requirements

Running this application requires an operating system that allows the display of Unicode windows — that is, Windows 2000 or later. It also requires that you have language support for all possible Windows languages installed (check in the Control Panel under Regional Options). The application can be built on any Windows version supported by Visual Studio .NET.

Building and Running the Sample

To build and run this sample

  1. Open the solution file unires.sln.

  2. From the Build menu, click Build.

  3. From the Debug menu, click Start Without Debugging. You will get a window with the sentence "When the world wants to talk, it speaks Unicode." displayed in 41 languages.

Keywords

This sample demonstrates the following keywords:

LoadString; CreateFontIndirect; GetTextMetrics; ScrollWindowEx; SetScrollInfo

See Also

Other Resources

International Samples

General Samples