Loading Language Resources

Your application loads all user interface language resources, other than certain redirected registry strings, using calls to standard resource loading functions, for example, FormatMessage, LoadString, and LoadImage. Many resource loading functions have been modified to load resources from language-specific resource files automatically, treating resources as if they are contained in the LN file. The following example illustrates the use of LoadString to load language strings for an application that follows system language settings.

HMODULE hResModule = LoadLibraryEx(TEXT("Mymodule.dll"), 0,
                                   LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE);
// ...
LoadString(hResModule, myID, lpBuffer, cbBufferSize);
// ...
FreeLibrary(hResModule);

Locating Win32 PE Resources