Windows API处理系统/用户区域设置 [英] Windows API to deal with system/user locale
本文介绍了Windows API处理系统/用户区域设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Windows sdk中是否有可用于设置用户或系统区域设置的API?
在此先感谢...
Is there any API in windows sdk that can be used to set the user or system locale?
Thanks in advance...
推荐答案
您可以使用 ^ ],然后从您的C ++代码执行它.在Vista之前的Windows版本中,有一种使用纯文本文件的类似方法:``rundll32 shell32,Control_RunDLL intl.cpl ,,/f:"c:locale.txt"''.
更改全局语言环境是一个管理过程,普通应用程序不应该执行.如果要更改应用程序的语言环境,请使用SetThreadLocale()
和setlocale()
函数.
You may use the Windows Vista Command Line Configuration of International Settings[^] and execute it from your C++ code. With Windows versions prior to Vista there is a similar method using a plain text file: ''rundll32 shell32, Control_RunDLL intl.cpl,,/f:"c:locale.txt"''.
Changing the global locales is an administrative process that should not be done by normal applications. If you want to change the locale of an application, use theSetThreadLocale()
andsetlocale()
functions.
这篇关于Windows API处理系统/用户区域设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文