GetNumberFormat - using its 'override' capabilities ?

Giganews Newsgroups
Subject: GetNumberFormat - using its 'override' capabilities ?
Posted by:  R.Wieser (addre…@not.available)
Date: Sun, 5 Apr 2020

Hello all,

Its about "GetNumberFormat" again.

https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getnumberformata

Its documentation to the "lpFormat" argument says:

[quote]
If this parameter does is not set to NULL, the function uses the locale only
for formatting information not specified in the structure
[/quote]
(and yes, that "does is not" is in there)

which seems to indicate that only the elements actually specified in that
NUMBERFMT structure will override the chosen locale (in the first argument).

The problem is that when I try that (structure fully initialized to Zero)
the function fails ('The parameter is incorrect").

My problem: How (or where) do I set the fields in that NUMBERFMT structure
to unspecified (should be ignored) ?

.... if that is what is actually possible that is.

Remark:
Currently all I want to do is to override the "NumDigits" field (to Zero).

Regards,
Rudy Wieser

Replies