Einzelnen Beitrag anzeigen

GeorgPeifer

Registriert seit: 7. Dez 2004
Ort: Kerpen
21 Beiträge
 
#3

Re: Beschriftung im Colordialog ändern?

  Alt 14. Dez 2004, 14:19
Hi Ultimator .. bei mir geht der Link.. komisch

so etwa siehts aus beim OpenDialog:

Code:
procedure TForm1.OpenDialog1Show(Sender: TObject);
{First, we need to determine identifiers of dialog's controls, they are following:}
const
  LB_FILETYPES_ID = 1089; // "File types:" label
  LB_FILENAME_ID = 1090; // "File name:" label
  LB_DRIVES_ID = 1091;   // "Look in:" label
var
  hOpenDialog: HWND;
  Str1,Str2,Str3,Str4,Str5:string;
begin
  Str1:=GetText('MainMenu','Main_Oeffnen','&Öffnen');
  Str2:=GetText('Subforms','Sub_Abbruch','&Abbruch');
  Str3:=GetText('Subforms','Sub_Dateityp','Dateityp')+':';
  Str4:=GetText('MainMenu','Main_Datei','&Datei')+':';
  Str5:=GetText('Subforms','Sub_Suchen_in','Suchen in')+':';
  hOpenDialog := GetParent(OpenDialog1.Handle);
  SendMessage(hOpenDialog, CDM_SETCONTROLTEXT, idOk, Longint(PChar(Str1)));
  SendMessage(hOpenDialog, CDM_SETCONTROLTEXT, idCancel, Longint(PChar(Str2)));
  SendMessage(hOpenDialog, CDM_SETCONTROLTEXT, LB_FILETYPES_ID, Longint(PChar(Str3)));
  SendMessage(hOpenDialog, CDM_SETCONTROLTEXT, LB_FILENAME_ID, Longint(PChar(Str4)));
  SendMessage(hOpenDialog, CDM_SETCONTROLTEXT, LB_DRIVES_ID, Longint(PChar(Str5)));
end;
damit konnte ich zumindest mal den Titel des Dialogs ändern .. aber alles andere bekomme ich nicht geändert

Code:
  SetWindowText(ColorDialog1.Handle,PChar('Hallo Das ist ein neuer Text'));
Georg Peifer
  Mit Zitat antworten Zitat