SatDLL Sample: Implements Multilingual Resources in a Win32 Application

The SatDLL sample demonstrates a number of things related to localization and globalization:

Security 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.

Building and Running the Sample

Note

If you are running Visual C++ Express Edition, you might need to install the Platform SDK before running this sample. For information on how to do this, see How to: Use Visual C++ Express Edition with the Microsoft Platform SDK.

To build and run this sample

  1. Open the solution file satdll.sln.

  2. From the Build menu, click Build Solution.

  3. From the Debug menu, click Start Without Debugging.

In the default configuration, this solution builds a Unicode application which requires Windows 2000 or later with language support for Western European languages and Japanese installed to display all characters in the user interface correctly.

By changing the Character Set in the general project settings to "Use Multi-Byte Character Set" the sample can be compiled for earlier Windows platforms. You will only be able to switch between languages which are supported by the ANSI codepage for that earlier Windows version though (for example, you will not be able to display Japanese on a English version of Windows ME).

Note

When debugging this sample, the current directory is the solution directory and not the Debug directory. For this reason, the directories for the satellite DLLs (1031, 1033, and 1041) are created in the solution directory. When you deliver your application to an end-user, these satellite DLL directories should, of course, be created in the directory where the main executable file is located.

Keywords

This sample demonstrates the following keywords:

LoadString; LoadMenu; LoadAccelerators; LoadIcon; LoadCursor; DialogBox; CreateFontIndirect; DrawText; InvalidateRect; UpdateWindow; DestroyMenu; SetMenu; DrawMenuBar; GetLocaleInfo; GetCurrentDirectory; FindFirstFile; FindNextFile; LoadLibrary; EnumResourceLanguages; GetVersionInfoEx; RegOpenKeyEx; RegQueryValueEx; RegCloseKey; GetUserDefaultUILanguage; GetUserDefaultLangID; _tWinMain; _tcscpy; _tcsncpy; _tcslen; _tcsclen; _tcscat; _ttoi; _itot