delphi res 字符串资源

//res 字符串资源 
//rc 文件:
StringTable
begin
0 "AAAA"
1 "BBBB"
2 "CCCC"
3 "DDDD"
end

//也可以这样写:
StringTable
begin
0,"AAAA"
1,"BBBB"
2,"CCCC"
3,"DDDD"
end

//还可以这样写:
StringTable
{
0,"AAAA"
1,"BBBB"
2,"CCCC"
3,"DDDD"
}


{严格的头可能是这样写: STRINGTABLE DISCARDABLE}


--------------------------------------------------------------------------------

//程序代码:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Memo1.Clear;
  with Memo1.Lines do
  begin
    Add(LoadStr(0));
    Add(LoadStr(1));
    Add(LoadStr(2));
    Add(LoadStr(3));  
  end;
end;

end.




posted @ 2014-07-29 20:30  XE2011  阅读(268)  评论(0编辑  收藏  举报