The edit controls and MS Access are working correctly.
They are using the decimal as defined in the Regional and Language Options as you have noticed.
The problem is the use of the
_wtof[
^] function.
The documentation states:
Quote:
The versions of these functions with the _l suffix are identical except that they use the locale parameter passed in instead of the current locale.
So the
_wtof
function uses the current locale. This is however not the one as set in the Regional and Language Options as you might expect.
In the documentation from
setlocale, _wsetlocale[
^] it states:
Quote:
At program startup, the equivalent of the following statement is executed:
setlocale( LC_ALL, "C" );
A value of C specifies the minimal ANSI conforming environment for C translation. The C locale assumes that all char data types are 1 byte and that their value is always less than 256.
This means that the '.' is used as the decimal point and converting the text with the ',' fails.
To solve your problem you need to set the locale to the one used by windows. For this you can use the function
_wsetlocale
like:
_wsetlocale( LC_ALL, L"" );
Alternatively you can use
LC_NUMERIC
to only effect the decimal point:
_wsetlocale( LC_NUMERIC, L"" );