AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi 12 ist offiziell da!!!

Ein Thema von wjjw · begonnen am 7. Nov 2023 · letzter Beitrag vom 29. Nov 2023
Antwort Antwort
OlafKr

Registriert seit: 12. Dez 2012
14 Beiträge
 
Delphi 10.4 Sydney
 
#1

AW: Delphi 12 ist offiziell da!!!

  Alt 9. Nov 2023, 10:58
Fehler gefunden: Bei Verwendung von CreateMessageDialog werden keine Icons mehr angezeigt.
In der VCL.Dialogs ist die Prüfung offenbar falsch

Delphi 11
function GetMsgIconResourceName: String;
begin
Result := '';
case DlgType of
mtWarning,
mtConfirmation:
Result := 'MSG_WARNING';
mtError:
Result := 'MSG_ERROR';
mtInformation:
Result := 'MSG_INFO';
end;
end;

Delphi 12
function GetMsgIconResourceName: String;
begin
Result := '';
case MsgDlgIcons[DlgType] of
TMsgDlgIcon.mdiWarning:

Result := 'MSG_WARNING';
TMsgDlgIcon.mdiError:
Result := 'MSG_ERROR';
TMsgDlgIcon.mdiInformation:
Result := 'MSG_INFO';
end;
end;
  Mit Zitat antworten Zitat
lxo

Registriert seit: 30. Nov 2017
260 Beiträge
 
Delphi 12 Athens
 
#2

AW: Delphi 12 ist offiziell da!!!

  Alt 9. Nov 2023, 11:25
Fehler gefunden: Bei Verwendung von CreateMessageDialog werden keine Icons mehr angezeigt.
In der VCL.Dialogs ist die Prüfung offenbar falsch

Delphi 11
function GetMsgIconResourceName: String;
begin
Result := '';
case DlgType of
mtWarning,
mtConfirmation:
Result := 'MSG_WARNING';
mtError:
Result := 'MSG_ERROR';
mtInformation:
Result := 'MSG_INFO';
end;
end;

Delphi 12
function GetMsgIconResourceName: String;
begin
Result := '';
case MsgDlgIcons[DlgType] of
TMsgDlgIcon.mdiWarning:

Result := 'MSG_WARNING';
TMsgDlgIcon.mdiError:
Result := 'MSG_ERROR';
TMsgDlgIcon.mdiInformation:
Result := 'MSG_INFO';
end;
end;
Das ist kein Fehler sondern eine Berichtigung von dem was bei Delphi 11.3 probiert wurde.
Siehe ab Post #149
https://www.delphipraxis.net/212558-...hon-da-15.html

Das Icon bei Confirmation wurde dort fälschlicherweise auf das Warnungssymbol geändert.
Da Windows in deren Leitlinien sagt, dass man bei Confirmation kein Logo mehr anzeigt. Weil das blaue Fragezeichen Hilfe und keine Frage signalisieren soll.
Das blaue Ausrufezeichen bei Information wird für MessageDlg auch nicht mehr empfohlen.

Siehe ...
Englisch
https://learn.microsoft.com/en-us/wi...ormation-icons
https://learn.microsoft.com/en-us/wi...ion-mark-icons
Deutsch
https://learn.microsoft.com/de-de/wi...ormation-icons
https://learn.microsoft.com/de-de/wi...ion-mark-icons


Damit werden die Leitlinien von Microsoft mit Delphi 12.0 eingehalten.

Es gibt jetzt aber eine globale Variable in Vcl.Dialogs die man nach belieben anpassen kann.

Delphi-Quellcode:
begin
  // Somit hat man das gleiche Verhalten wie in 11.3
  MsgDlgIcons[mtInformation] := mdiInformation;
  MsgDlgIcons[mtConfirmation] := mdiWarning;

  // Somit hat man das gleiche Verhalten wie in 11.2
  MsgDlgIcons[mtInformation] := mdiInformation;
  MsgDlgIcons[mtConfirmation] := mdiInformation;
end;

Geändert von lxo ( 9. Nov 2023 um 11:40 Uhr)
  Mit Zitat antworten Zitat
OlafKr

Registriert seit: 12. Dez 2012
14 Beiträge
 
Delphi 10.4 Sydney
 
#3

AW: Delphi 12 ist offiziell da!!!

  Alt 9. Nov 2023, 12:09
Danke, nach der Anpassung funktioniert es.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.203 Beiträge
 
Delphi 12 Athens
 
#4

AW: Delphi 12 ist offiziell da!!!

  Alt 9. Nov 2023, 12:46
Wo hast/hättest du denn zuerst gesucht?

An dieser internen Funktion, CreateMessageDialog, aufrufenden Funktionen, dem TMsgDlgButtons in Vcl.Dialogs oder dem Eigentlichen in System.UITypes oder oder oder

Es wäre bestimmt sinnvoll "dort" sowas zu dokumentieren (Kommentar mit Link und/oder Beschreibung)
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
OlafKr

Registriert seit: 12. Dez 2012
14 Beiträge
 
Delphi 10.4 Sydney
 
#5

AW: Delphi 12 ist offiziell da!!!

  Alt 9. Nov 2023, 12:56
Ich habe die Quelltexte von Delphi 11.3 und Delphi 12 verglichen, da ich diverse Dialogen mit CreateMessageDialog realisiert habe, die nun ohne Icon angezeigt wurden.
  Mit Zitat antworten Zitat
Antwort Antwort


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:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz