Z
zhou_jing_wei
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormCreate(Sender: TObject);
var res:TResourcestream;
var dd:Thandle;
begin
dd:=findresource(hInstance,'11.res',RT_CURSOR);
if dd=0 then showmessage('not find resource');
// res:=TResourcestream.Create(dd,'ABC1',RT_CURSOR);
screen.Cursors[5]:=loadcursor(hInstance,'ABC1');
screen.Cursor:=5;
end;
各位大哥,小弟加上 被注释掉的那一句 就会报错说(不加不报错):'resource ABC1 not found'
听说TResourcestream.Create方法会调用windows api函数 findresource
于是我加上这个api函数来测试,结果输出:'not find resource'
请问仁兄 小弟对TResourcestream.Create的调用错在什么地方?
var res:TResourcestream;
var dd:Thandle;
begin
dd:=findresource(hInstance,'11.res',RT_CURSOR);
if dd=0 then showmessage('not find resource');
// res:=TResourcestream.Create(dd,'ABC1',RT_CURSOR);
screen.Cursors[5]:=loadcursor(hInstance,'ABC1');
screen.Cursor:=5;
end;
各位大哥,小弟加上 被注释掉的那一句 就会报错说(不加不报错):'resource ABC1 not found'
听说TResourcestream.Create方法会调用windows api函数 findresource
于是我加上这个api函数来测试,结果输出:'not find resource'
请问仁兄 小弟对TResourcestream.Create的调用错在什么地方?