Click here to Skip to main content
15,896,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does calling std::locale::global() affect all win32 api functions and mfc classes ? Or does calling it affect only standard c functios and std c++ classes?
Posted
Updated 13-Jul-15 22:59pm
v2

1 solution

It affects the C++ library functions and optional also the C standard library functions. See http://www.cplusplus.com/reference/locale/locale/global/[^].

To set a locale for the Windows API functions, use SetThreadLocale[^].

For MFC it depends. Some MFC controls like CComboBox provide a SetLocale member function to select a different locale. The CString classes use the standard C libraries for formatting and are therefore affected by setlocale.
 
Share this answer
 
Comments
Gbenbam 18-Aug-15 3:22am    
Thanks. I appreciate this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900