AGB  ·  Datenschutz  ·  Impressum  







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

Falsche Fontfarbe

Ein Thema von EWeiss · begonnen am 8. Okt 2016 · letzter Beitrag vom 8. Okt 2016
 
EWeiss
(Gast)

n/a Beiträge
 
#2

AW: Falsche Fontfarbe

  Alt 8. Okt 2016, 19:47
Ok
Anscheinend will oder kann mir niemand helfen.

Habe es jetzt selbst bereinigt.
Das Problem ist das TColor nicht gleich System Color ist.
Deshalb musste ich die Farben übersetzen. (Was für eine Schmarrn)

Anwendung:
Delphi-Quellcode:
       if TWinControl(Comp.Controls[i]) = Form1.CheckBox1 then
       begin
         CB.Font := Form1.CheckBox1.Font;
         CB.BackColor := Form1.CheckBox1.Color;
         CB.Connect;
       end else if TWinControl(Comp.Controls[i]) = Form1.CheckBox2 then
       begin
         CB.Font := Form1.CheckBox2.Font;
         CB.BackColor := Form1.CheckBox2.Color;
         CB.Connect;
       end else if TWinControl(Comp.Controls[i]) = Form1.CheckBox3 then
       begin
         CB.Font := Form1.CheckBox3.Font;
         CB.BackColor := Form1.CheckBox3.Color;
         CB.Connect;
       end;
DLL:
  SetTextColor(DC, TranslateColor(Font.Color));
Delphi-Quellcode:
function TranslateColor(AClr: Integer): Colorref;
begin

  If (AClr and $80000000) = $80000000 then
    Result := GetSysColor(AClr and $FF)
  else
    Result := AClr;
end;
gruss
  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 05:06 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