SHBrowseForFolder爆了(20分)

  • 主题发起人 主题发起人 visual_cjiajia
  • 开始时间 开始时间
V

visual_cjiajia

Unregistered / Unconfirmed
GUEST, unregistred user!
[:(][blue]我要调用SHBrowseForFolder来弹出特殊的文件夹窗体;<br>编译时没问题; 但程序运行到pidl:=SHBrowseForFolder(selectwin);<br>时DELPHI一直报错,请教一下错在哪里了*_*?<br><br>uses shlobj;<br><br>var<br>&nbsp;selectwin:TBrowseInfo;<br>&nbsp;pidl:PItemIDList;<br>&nbsp;itemid:integer;<br>begin<br>selectwin.hwndOwner :=form1.Handle ;<br>itemid:=0;<br>SHGetSpecialFolderLocation(form1.Handle,itemid,pidl);<br><br>selectwin.pidlRoot := pidl;<br>selectwin.lpszTitle :=PAnsiChar('浏览文件夹');<br>selectwin.ulFlags := BIF_RETURNONLYFSDIRS;<br><br>pidl:=SHBrowseForFolder(selectwin);//一直报错EAccessVoilation Error<br>end;[/blue]
 
我要调用SHBrowseForFolder来弹出特殊的文件夹窗体;<br>编译时没问题; 但程序运行到pidl:=SHBrowseForFolder(selectwin);<br>时DELPHI一直报错,请教一下错在哪里了*_*?<br><br>uses shlobj;<br><br>var<br>&nbsp;selectwin:TBrowseInfo;<br>&nbsp;pidl:PItemIDList;<br>&nbsp;itemid:integer;<br>begin<br>selectwin.hwndOwner :=form1.Handle ;<br>itemid:=0;<br>SHGetSpecialFolderLocation(form1.Handle,itemid,pidl);<br><br>selectwin.pidlRoot := pidl;<br>selectwin.lpszTitle :=PAnsiChar('浏览文件夹');<br>selectwin.ulFlags := BIF_RETURNONLYFSDIRS;<br><br>pidl:=SHBrowseForFolder(selectwin);//一直报错EAccessVoilation Error<br>end;[/blue]<br><br><br>你帮助我GZ的问题研究出来了吗?谢谢!
 
后退
顶部