Post by jNizM » 12 Feb 2019, 04:15
Mit Format noch nicht probiert.. Hab dazu bisher immer die GetNumberFormat Funktion benutzt (
https://github.com/jNizM/AHK_Scripts/tree/master/src/format_strings)
Code: Select all
GetNumberFormat(VarIn, locale := 0x0400)
{
if !(size := DllCall("GetNumberFormat", "uint", locale, "uint", 0, "ptr", &VarIn, "ptr", 0, "ptr", 0, "int", 0))
throw Exception("GetNumberFormat", -1)
VarSetCapacity(buf, size * (A_IsUnicode ? 2 : 1), 0)
if !(DllCall("GetNumberFormat", "uint", locale, "uint", 0, "ptr", &VarIn, "ptr", 0, "Str", buf, "int", size))
throw Exception("GetNumberFormat", -1)
return buf
}
MsgBox % SubStr(GetNumberFormat(999999999), 1, -3)
Mit Format noch nicht probiert.. Hab dazu bisher immer die GetNumberFormat Funktion benutzt (https://github.com/jNizM/AHK_Scripts/tree/master/src/format_strings)
[code]GetNumberFormat(VarIn, locale := 0x0400)
{
if !(size := DllCall("GetNumberFormat", "uint", locale, "uint", 0, "ptr", &VarIn, "ptr", 0, "ptr", 0, "int", 0))
throw Exception("GetNumberFormat", -1)
VarSetCapacity(buf, size * (A_IsUnicode ? 2 : 1), 0)
if !(DllCall("GetNumberFormat", "uint", locale, "uint", 0, "ptr", &VarIn, "ptr", 0, "Str", buf, "int", size))
throw Exception("GetNumberFormat", -1)
return buf
}
MsgBox % SubStr(GetNumberFormat(999999999), 1, -3)[/code]