{
To create resource files (*.res) for Kylix you can use the Delphi
brcc32.exe resource compiler.
Take a look at ;http://www.swissdelphicenter.ch/en/showcode.php?id=1049
Kylix dont support userdefined resourcetypes. Therefore you have to define
all resources without a predefined ResType as RCDATA.
Example with TResourceStream
Saves the resource (in userdefined.res) with the name MYRES1 to the file
test.txt
}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) dobegin
CopyFrom(stream, stream.Size);
Free;
end;
end;
Если Вас заинтересовала или понравилась информация по разработке на Delph - "Как использовать ресурсы", Вы можете поставить закладку в социальной сети или в своём блоге на данную страницу: Так же Вы можете задать вопрос по работе этого модуля или примера через форму обратной связи, в сообщение обязательно указывайте название или ссылку на статью!