Using Win32 functions in Visual FoxPro Image Gallery
Multilingual User Interface
GetProcessPreferredUILanguages
GetThreadUILanguage
GetUserDefaultUILanguage
SetProcessPreferredUILanguages
Code examples:
SetProcessPreferredUILanguages
..msdn    Add comment     W32 Constants      Translate this page
Sets the process preferred UI languages for the application process.
Code examples:
Declaration:
BOOL SetProcessPreferredUILanguages(
  _In_       DWORD dwFlags,
  _In_opt_   PCZZWSTR pwszLanguagesBuffer,
  _Out_opt_  PULONG pulNumLanguages
);
FoxPro declaration:
DECLARE INTEGER SetProcessPreferredUILanguages IN kernel32;
    INTEGER dwFlags,;
    STRING @pwszLanguagesBuffer,;
    INTEGER @pulNumLanguages
Parameters:
dwFlags [in]
Flags identifying the language format to use for the process preferred UI languages.

pwszLanguagesBuffer [in, optional]
Pointer to a double null-terminated multi-string buffer that contains an ordered, null-delimited list in decreasing order of preference.

pulNumLanguages [out, optional]
Pointer to the number of languages that has been set in the process language list from the input buffer, up to a maximum of five.
Return value:
Returns TRUE if successful or FALSE otherwise.
Usage:
#DEFINE MUI_LANGUAGE_ID 0x4
#DEFINE MUI_LANGUAGE_NAME 0x8

#DEFINE LOCALEID_FR_CA 0x0C0C
#DEFINE LOCALEID_EN_CA 0x1009

nNumLanguages = 0

cBuffer = STRCONV("fr-CA" + CHR(0) + "en-CA" + CHR(0), 5)
*cBuffer = STRCONV("1009" + CHR(0) + "0C0C" + CHR(0), 5)  && use MUI_LANGUAGE_ID

? SetProcessPreferredUILanguages(;
    MUI_LANGUAGE_NAME,;
    @cBuffer,;
    @nNumLanguages;
    )

? nNumLanguages
My comment:
By default, a VFP process does not have any preferred UI languages set.

MSDN: Ideally, applications will call SetProcessPreferredUILanguages as soon as possible after launching. Use of MUI_LANGUAGE_NAME is recommended over MUI_LANGUAGE_ID.

See also: GetProcessPreferredUILanguages
Word Index links for the SetProcessPreferredUILanguages :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2015-01-23 18:58:26
Modified: 2015-01-23 19:12:31
Visited in last 7 days: 59
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.92.194.75)
16 sec.Function: 'CeEnumDBVolumes'
33 sec.Function: 'URLDownloadToFile'
50 sec.Function: 'LookupPrivilegeDisplayName'
1.12 min.Function: 'CertCloseStore'
1.42 min.Function: 'NetShareDel'
1.72 min.
Function group: 'Window Station and Desktop'
1.98 min.
Function group: 'GDI+ Graphics'
2.28 min.
Function group: 'Color'
2.6 min.Function: 'GetStringTypeEx'
2.87 min.Function: 'FileTimeToSystemTime'
Google
Advertise here!