Windows系统, vc++ 获取系统区域设置语言标识

Q:Windows系统, vc++ 获取系统区域设置语言标识

A:1,管理员可以在Control Panel Clock,Language, and Region > Change date, time, or number formats > Administrative tab设置;

 2.1,GetSystemDefaultLangID(void) 返回本地系统语言标识;

 2.2,获取Primary Language ID

         LANGIDlangId = GetSystemDefaultLangID();

         DWORDPrimLangId = 0;

         PrimLangId= langId & 0x03FF;

2.3,  获取SubLanguageID

         LANGIDlangId = GetSystemDefaultLangID();

         DWORDSubLangId = 0;

         SubLangId= langId >> 10;

 

参考链接:

GetSystemDefaultLangID(void)

https://msdn.microsoft.com/en-us/library/windows/desktop/dd318120(v=vs.85).aspx

language identifier

https://msdn.microsoft.com/en-us/library/windows/desktop/dd318691(v=vs.85).aspx

Language Identifier Constants and Strings

https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693(v=vs.85).aspx

你可能感兴趣的:(Visual,C++/MFC)