AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi GetLocaleInfo() Aufruf, ist es so richtig?
Thema durchsuchen
Ansicht
Themen-Optionen

GetLocaleInfo() Aufruf, ist es so richtig?

Ein Thema von KodeZwerg · begonnen am 2. Apr 2018 · letzter Beitrag vom 3. Apr 2018
 
günni0
(Gast)

n/a Beiträge
 
#7

AW: GetLocaleInfo() Aufruf, ist es so richtig?

  Alt 2. Apr 2018, 17:34
Jetzt noch alles in eine eigene Unit und alles ist sauber, schön und leicht erweiterbar (jedenfalls würde ich es so machen).

Delphi-Quellcode:
unit MyUnitX;

interface

type
 TUnitX = record
 private
 var
  MyFormatSettings: TFormatSettings;
 public
  class function ThousandSeparator : string; static;
 end;

implementation

var
 UnitX: TUnitX;

class function TUnitX.ThousandSeparator : String;
begin
  Result := FormatSettings.ThousandSeparator;
end;

initialization

UnitX.MyFormatSettings := TFormatSettings.Create(GetUserDefaultLCID);
So eine ähnliche Unit habe ich. Grund für MyFormatSettings ist, weil ich FormatSettings überschreibe und immer noch die originalen Werte haben möchte.

Geändert von günni0 ( 2. Apr 2018 um 17:40 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:40 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz