hier ist das erklärt:
http://msdn.microsoft.com/library/de.../resources.asp
mal ein auszug aus meinem DFMedit zum ändern der form-resource:
Delphi-Quellcode:
function TForm_DFMChooseRes.loadFile(filename:string):integer;
begin
freelibrary(hModule);
Listbox1.Clear;
hModule:=LoadLibraryEx(PCHAR(filename),0,LOAD_LIBRARY_AS_DATAFILE);
if hModule <> 0 then
begin
fName:=filename;
EnumResourceNames(hModule, RT_RCDATA,@EnumDfmNameProc, Integer(Listbox1.Items));
end;
result:=hModule;
end;
procedure TForm_DFMChooseRes.ReplaceRes(s:TStrings;resname:string);
var h :THandle;
ms:TStringStream;
ms2: TMemoryStream;
begin
if hModule<>0 then
begin
createbackup(fname);
freelibrary(hModule);
ms:=TStringStream.create(s.Text);
ms2:=TMemoryStream.create;
ObjectTextToBinary(ms,ms2);
ms2.Position:=0;
if resname='' then
resname:=FormName;
h := BeginUpdateResource(PChar(fname), false);
UpdateResource(h, RT_RCData, PCHAR(ResName), 0, ms2.Memory, ms2.size);
EndUpdateResource(h, false);
ms2.Free;
ms.free;
end;
end;
den rest musst du probieren/googlen
HTH Frank