Einzelnen Beitrag anzeigen

Dezipaitor

Registriert seit: 14. Apr 2003
Ort: Stuttgart
1.701 Beiträge
 
Delphi 7 Professional
 
#22

Re: Unicode Ersatz für Format

  Alt 13. Nov 2007, 14:30
Zitat:
Delphi-Quellcode:
MessageBoxW(hDPM, PWideChar(Format('Error while downloading and processing updateinformation.'
  + #13#10'Message: %S'#13#10'Errorclass: %S', [_(e.Message), _(e.ClassName_)])),
  '[Update Plugin] Downloading/Processingerror', MB_OK or MB_ICONERROR);

MessageBoxW(hDPM, PWideChar(Format('Error while downloading and processing updateinformation.'
  + #13#10'Message: %s'#13#10'Errorclass: %s', [WideString(_(e.Message)), WideString(_(e.ClassName_))])),
  '[Update Plugin] Downloading/Processingerror', MB_OK or MB_ICONERROR);
Wie wärs, wenn die Formatfunktion auch noch C-Formatierungssymbole erkennen würde? z.b. \r\n für Windows Zeilenumbruch, statt #13#10.
Der obige Code ist meiner Meinung nach nicht wirklich toll.
Christian
Windows, Tokens, Access Control List, Dateisicherheit, Desktop, Vista Elevation?
Goto: JEDI API LIB & Windows Security Code Library (JWSCL)
  Mit Zitat antworten Zitat