在FORMCREATE程序我写:无法找到资源文件的 '权利'
var f: TResourceStream;
begin
// load data about rights from rights.txt resource file
f := TResourceStream.create(Hinstance, 'rights', PChar('RT_RCDATA'));
try
LoadFromStream(f);
finally
f.free;
end;
,并得到错误:
Project1.exe raised exception class ERESNotFound with message 'Resource rights not found'.
如果我改变文件路径 '权利':
'rights.txt' or
'D:\Example\rights.txt' or
'D:\Example\rights'
我得到同样的错误!
rights.txt文件我在项目文件夹和win32 \ debug \ project1.exe文件夹中找到了这两个文件,但发生了同样的错误。
更新1
rights.txt file for loading popupmenu
这将是在rights.txt文件中的这些不确定simbols?
你有t o通过资源编译器或后来的delphi版本将RC数据编译到Res,这可以通过Project,Resources菜单处理,我相信它是,你已经做到了,先不是吗? – Craig
我在“项目” - >“资源和图像”中输入并添加'rights.txt'文件来资源化,但使用后没有行出现在项目文件中。我只看到{$ R * .res},并出现相同的错误。 德尔福版本:10.1柏林 – Delphi159
我已经在项目管理器中看到'rights.txt'文件,但同样的错误出现。 – Delphi159