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 the