Delphi - undeclared identifier: LOCALE_SYSTEM_DEFAULT

I am trying to format a float (advanced) using the default currency settings for the language system. I found a key proponent of this solution in the following line:

GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, format_settings);

and wherever I look, they provide a solution exactly as shown (not a class specifier before, like System.LOCALE_SYSTEM_DEFAULT or something else). However, my compiler insists that LOCALE_SYSTEM_DEFAULT is an undeclared identifier. It seems to me, "→, that the only requirement is to use" SysUtils ", which I do.

I am using Delphi 2010. Does anyone know why my compiler cannot find this seemingly implicit constant?

Thanks in abundance,
Jared

+5
source share
1 answer

Add Windows to your use list. This identifier is defined there.

+14
source

All Articles