Einzelnen Beitrag anzeigen

teebee

Registriert seit: 17. Jan 2003
Ort: Köln
460 Beiträge
 
Delphi 6 Professional
 
#3

Re: bezeichnungen bei standard-dialogen ändern, aber wie?

  Alt 19. Sep 2008, 13:13
Delphi-Quellcode:
procedure TForm1.OpenDialog1Show(Sender: TObject);
var
  Dlg: TOpenDialog;
  DlgWnd: hWnd;
begin
  Dlg := Sender as TOpenDialog;
  if ofOldStyleDialog in Dlg.Options
  then DlgWnd := Dlg.Handle
  else DlgWnd := GetParent(Dlg.Handle);
  if GetParent(DlgWnd) <> Application.Handle then exit;
  SetDlgItemText(DlgWnd, 1, 'Select'); // hier statt einer 1 für den Öffnen-Button die gewünschte Control-ID wählen, s.u.
end;
Code:
Control-ID Control description
chx1       The read-only check box
cmb1       Drop-down combo box that displays the list of file type filters
stc2       Label for the cmb1 combo box
cmb2       Drop-down combo box that displays the current drive or folder, and that allows the user to select a drive or folder to open
stc4       Label for the cmb2 combo box
cmb13      Drop-down combo box that displays the name of the current file, allows the user to type the name of a file to open, and select a file that has been opened or saved recently. This is for earlier Explorer-compatible applications without hook or dialog template. Compare with edt1.
edt1       Edit control that displays the name of the current file, or allows the user to type the name of the file to open. Compare with cmb13.
stc3       Label for the cmb13 combo box and the edt1 edit control
lst1       List box that displays the contents of the current drive or folder
stc1       Label for the lst1 list box
IDOK      The OK command button (push button)
IDCANCEL  The Cancel command button (push button)
pshHelp   The Help command button (push button)
Die Konstanten sind in Dlgs.pas definiert.
  Mit Zitat antworten Zitat