Searches a resource file for a resource whose language best matches the language requested
[C++]
LANGID ResFindLanguageForResource(
HINSTANCE hinst,
LPTSTR lpszType,
LPTSTR lpszName,
LANGID langidUser
);
Module handle of a resource file.
Resource type string, e.g. RT_STRING.
Resource name. This may be constructed from an integer ID using the MAKEINTRESOURCE(...) macro.
The language ID of the desired language. This can be formed using the MAKELANGID(...) macro, or found using LANGIDFROMLCID(GetThreadLocale()).
The language ID of a particular resource in a language which best matches
the language requested, if found. If no such resource is found, then the next best matching
language ID is returned. If no match is found,
then MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)
is returned.
This function iterates through all the resources, of the specified type and name,
in the resource file until it finds a resource in a language exactly matching langidUser.
If no exact match is found then the first partial match (same language but a different sub-language)
is returned.
This function is used by XllLoadString()
and ResLoadString()
to locate language-specific resources.
Header: xllres.h