Re: Label "Benutzerdefinierte Farben" im Colordial
.. vielen dank nochmal..
Das mit {$ALIGN ON} und vcl40 haut hin... jetzt meckert er über rtl40 - eine solche Datei habe ich gar nicht auf meinem Rechner.. ist wohl doch nicht so easy die Komponente umzuschreiben :( Update: Ich habe soeben eine Lösung für das Problem im API-Forum bekommen :bounce2: Für diejenigen, die es später mal interessiert:
Code:
vielen Dank nochmal :cheers:
procedure TForm1.ColorDialog1Show(Sender: TObject);
const COLOR_ADD = 712; COLOR_MIX = 719; COLOR_HUEACCEL = 723; COLOR_SATACCEL = 724; COLOR_LUMACCEL = 725; COLOR_REDACCEL = 726; COLOR_GREENACCEL = 727; COLOR_BLUEACCEL = 728; COLOR_SOLID_LEFT = 730; COLOR_SOLID_RIGHT = 731; COLOR_BASIC_COLORS = 65535; var ChildHWnd: HWND; begin // Fensterhandle für "Grundfarben" ermitteln // ist das erste Control auf dem Dialog ChildHWnd := GetWindow((Sender as TColorDialog).Handle, GW_CHILD); // Handle gefunden? if IsWindow(ChildHWnd) then begin // Fensterhandle für "Benutzerdefinierte Farben" finden // ist das dritte Control ChildHWnd := GetWindow(ChildHWnd, GW_HWNDNEXT); // Zweites Control gefunden? if IsWindow(ChildHWnd) then begin // weiter machen... um drittes Control zu ermitteln ChildHWnd := GetWindow(ChildHWnd, GW_HWNDNEXT); // Handle gefunden? if IsWindow(ChildHWnd) then // Text für "Benutzerdefinierte Farben" ändern SendMessage(ChildHWnd, WM_SETTEXT, 0, Longint(PChar('Custom Colors:'))); end; {end if} end; {end if} SetWindowText(ColorDialog1.Handle,PChar('Colors')); SetWindowText(GetDlgItem(ColorDialog1.Handle, idOk), PChar('OK')); SetWindowText(GetDlgItem(ColorDialog1.Handle, idCancel), PChar('Cancel')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_BASIC_COLORS), PChar('Basic Colors:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_MIX), PChar('Define Custom Colors >>')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_ADD), PChar('Add to Custom Colors')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_HUEACCEL), PChar('Hue:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_SATACCEL), PChar('Sat:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_LUMACCEL), PChar('Lum:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_REDACCEL), PChar('Red:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_GREENACCEL), PChar('Green:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_BLUEACCEL), PChar('Blue:')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_SOLID_LEFT), PChar('Color|')); SetWindowText(GetDlgItem(ColorDialog1.Handle, COLOR_SOLID_RIGHT), PChar('Solid')); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:17 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