unit displaylicencedialog; {* * EMPRIP - Display licences from resource strings * Windows CD Audio extraction and MP3 Encoder * (C) 2003 Matthew J. Smith, Librarysmith Software * Based on AKRIP (http://akrip.sourceforge.net) cddb and audio extraction library * and the LAME projects (http://wwww.mp3dev.org) LAME_ENC.DLL. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type Tdisplaylicence = class(TForm) Button1: TButton; Memo1: TMemo; procedure Memo1KeyPress(Sender: TObject; var Key: Char); private { Private declarations } public { Public declarations } end; var displaylicence: Tdisplaylicence; procedure showlicence(resourcename : string; Cap : string); implementation {$R *.DFM} procedure showlicence(resourcename : string; Cap: string); var rs : TresourceStream; a : string; begin displaylicence:=tdisplaylicence.create(application); displaylicence.caption:=Cap; rs:=TResourceStream.Create(hInstance, resourcename, RT_RCDATA); setlength(a,rs.size); rs.read(a[1],rs.size); rs.free; displaylicence.memo1.text:=string(a); displaylicence.showmodal; end; procedure Tdisplaylicence.Memo1KeyPress(Sender: TObject; var Key: Char); begin key:=#0; end; end.