在Delphi中如何使用RC文件中的字符串表[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 ocsoft 的 blog

{利用windows api}

procedure tform1.button1click(sender: tobject);

var

  arystr: array [0..255] of char;

begin

  windows.loadstring(hinstance, ids_rc, arystr, sizeof(arystr));

  showmessage(arystr);

end;

procedure tform1.button2click(sender: tobject);

var

  arystr: array [0..255] of char;

begin

  windows.loadstring(hinstance, ids_hello, arystr, sizeof(arystr));

  showmessage(arystr);

end;

{利用delphi原生函数}

procedure tform1.button3click(sender: tobject);

begin

  showmessage(loadstr(ids_hello));

end;

procedure tform1.button4click(sender: tobject);

begin

  showmessage(loadstr(ids_rc));

end;

end.

本文关键:BRCC ResourceWorkshop LoadString
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top