Hi,
I know about that general information but it does not solve my problem.
I tried the following:
type
PResStringRec = ^TResStringRec;
TResStringRec = record
DefStr: string;
NewStr: string;
end;
function ResModIterator(Name, Value: AnsiString; Hash: Longint; arg:pointer): AnsiString;
begin
if Value = PResStringRec(arg).DefStr then
Result := PResStringRec(arg).NewStr
else
Result := '';
end;
procedure ResMod(const Res: string; const NewValue: string);
var
Rec: TResStringRec;
begin
if Res <> '' then
begin
Rec.DefStr := Res;
Rec.NewStr := NewValue;
SetResourceStrings(ResModIterator, @Rec);
end;
end;
//calling in code:
resourcestring
sResString = 'test string';
begin
ModRes(sResString, 'new test string');
end;
Calling ResMod seems to modify the resourcestring - line "Result := PResStringRec(arg).NewStr"
is called. But later in program I still see the default text...
Because of KGrid we started a new project where we need some other features as TTreeColumn so there will be
most certainly further development.
TK