Title: How to use RCDATA resources in Kylix
uses
SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs,
QStdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.xfm}
{$R userdefined.res}
procedure TForm1.Button1Click(Sender: TObject);
var
stream: TResourceStream;
begin
stream := TResourceStream.Create(HInstance, 'MYRES1', RT_RCDATA);
with TFileStream.Create('test.txt', fmCreate) do begin
CopyFrom(stream, stream.Size);
Free;
end;
end;