GetThreadLocale returns different value than GetUserDefaultLCID?

前端 未结 5 702
迷失自我
迷失自我 2020-12-08 05:30

To get the locale settings, e.g. short date format, we\'ve always used GetLocaleFormatSettings with GetThreadLocale. This has always worked without problem until now.

<
5条回答
  •  猫巷女王i
    2020-12-08 05:46

    I noticed same problem, when I started using new Windows 7 computer. I spent some time trying to find what causes this, but found nothing. So I just added these two lines to some units initialization section.

    initialization
      SetThreadLocale(LOCALE_USER_DEFAULT);
      GetFormatSettings;
    

    Strange is that this behavior occurs only in my computer as we have few other Win7 computers in office also.

提交回复
热议问题