TFCResStrings v1.0


Author: Gennady A. Petrov [pgennady@home.tula.net];
Status: Freeware;

Source: Include;

Type: VCL non-visible;

Unit: FCResStrings;

Comment: only for MSWindows.

 

Contents

1. What is this?
2. How to use?
3. Description
4. Legal disclaimer

 

1. What if this?
    - component for change value of const precompiled by directive RESOURCESTRING in run-time mode, without change the source modules. May be used for localization resource strings. Can switch to DEFAULT resource strings.

 

2. How to use?
To change any constant you is necessary to write the initialization code for component-var FCResStrHolder, I recommend for each module resource write the twin-module with init code (see FCRSxxxxxx.pas in demo). After possible add strings to TFCResStrings components and const values is changed.

 

3. Description

 

    Minus

  1. Use global memory (by default strings loaded before use from exe or dll library)

  2. Need write initialization code.

    Pluses

  1. Hot change RESOURCESTRING and can switch to DEFAULT restrings.

  2. If use with component TFCStorer may will localize any Application without creating dll localization file.

Unit FCResStrings
Component or variable Description
TFCResStrings Contained changing order  resource strings
FCResStrHolder: TFCResStrHolder Variable-component, access to all initialized resource strings  of your application

 

TFCResStrings
Property Description
ResStrings: TResStrItems List of strings resource, where StringName - a name of the string, which is uses for its identifications, StringValue - new value of the res string

 

FCResStrHolder: TFCResStrHolder
Method Description
SetStringValue(const SName: String; pBaseResStr: PResStringRec); Initialize res string for change it with TFCResStrings. Example: SetStringValue('ComConst_SCreateRegKeyError', @SCreateRegKeyError).
LoadDefault; Set default resource strings, strings write in TFCResStrings a ignored  to reset it use procedure Update.

4. Legal disclaimer

This software and accompanying files are distributed "AS IS". No warranty of any kind is expressed or implied. You use at your own risk. The author will not be liable for data loss, damages, loss of profits or any other kind of loss while using or misusing this software.