<marqueE><b>谁来说一下</b></marqueE>(50分)

  • 主题发起人 主题发起人 Keyes
  • 开始时间 开始时间
K

Keyes

Unregistered / Unconfirmed
GUEST, unregistred user!
谁说一下:<br>SHBrowseForFolder,SHGetDesktopFolder,SHChangeNotify,SHAddToRecentDocs,SHFileOperation,SHGetFileInfo,SHGetInstanceExplorer等等。<br>的用法!!!!<br>谢谢!!!!
 
&lt;marqueE&gt;&lt;b&gt;我来听一下&lt;/b&gt;&lt;/marqueE&gt;
 
&lt;marqueE&gt;&lt;b&gt;请查MSDN!纯属灌水:)&lt;/b&gt;&lt;/marqueE&gt;
 
呵呵, 同意hubdog:-)
 
给你贴上一段程序.具体的参数含义请看帮助。<br>(这种问题才给50分,太...)<br><br>SHGetDeskTopFolder的用法。SHBrowseForFolder的使用与SHGetDeskTopFolder<br>的使用十分相似.<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>Var<br>&nbsp; &nbsp;pEnumPidl &nbsp; &nbsp; : Array [0..1] Of PItemIDList;<br>&nbsp; &nbsp;pEnum &nbsp; &nbsp; &nbsp; &nbsp; : IEnumIDList;<br>&nbsp; &nbsp;ulNumpidls &nbsp; &nbsp;: Integer;<br>&nbsp; &nbsp;srName &nbsp; &nbsp; &nbsp; &nbsp;: TStrRet;<br>&nbsp; &nbsp;Flags &nbsp; &nbsp; &nbsp; &nbsp; : DWord;<br>begin<br>&nbsp; &nbsp; &nbsp;If pDesktop = Nil Then<br>&nbsp; &nbsp; &nbsp; &nbsp; SHGetDeskTopFolder(pDeskTop);<br><br>&nbsp; &nbsp; &nbsp;Flags :=SHCONTF_FOLDERS Or SHCONTF_NONFOLDERS Or SHCONTF_INCLUDEHIDDEN;<br>&nbsp; &nbsp; &nbsp;pDeskTop.EnumObjects(Handle,Flags,pEnum);<br><br>&nbsp; &nbsp; &nbsp;Repeat<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pEnum.Next(1,pEnumpidl[0],ulNumpidls);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If (ulNumpidls &gt; 0) Then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pDesktop.GetDisplayNameOf(pEnumPidl[0],SHGDN_NORMAL,srName);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case srName.uType Of<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRRET_CSTR:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Memo1.Lines.Add(srName.cStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRRET_OFFSET:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Memo1.Lines.Add(srName.pStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; STRRET_WSTR:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Memo1.Lines.Add(srName.pOleStr);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End;<br>&nbsp; &nbsp; &nbsp;Until (ulNumPidls = 0);<br><br>// &nbsp; &nbsp; pDesktop._Release();<br>end;<br><br>&nbsp; SHFileOperation的用法。<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>Var<br>&nbsp; FileOp &nbsp; &nbsp; &nbsp;: TShFileOpStruct;<br>begin<br>&nbsp; FileOp.Wnd := Handle;<br>&nbsp; FileOp.wFunc := FO_COPY;<br>&nbsp; FileOp.fFlags := FOF_ALLOWUNDO;<br>&nbsp; FileOp.hNameMappings := Nil;<br>&nbsp; FileOp.lpszProgressTitle := PChar('建立新数据库结构,请稍侯!');<br><br>&nbsp; FileOp.pFrom := PChar(DirectoryEdit1.Text + #0 + #0);<br>&nbsp; FileOp.pTo &nbsp; := PChar(DirectoryEdit2.Text);<br><br>&nbsp; SHFileOperation(FileOp);<br>end;
 
wo kao, 连keyes自己也"跟"??? :-)
 
人家gg玩玩嘛,别怪人家的啦
 
这个字飘来飘去的 ,怎么玩的,<br>说来听听....
 
&gt;&gt;cAkk<br>没人跟啦,只好自己.......<br>谁能给个例子,就贴出来嘛!<br>不要尽灌水!!!!!!!!!!w~~~~ w~~~~~~~<br><br>
 
怎么玩的?我也想玩~~~~
 
接受答案了.
 
&lt;marqueE&gt;&lt;b&gt;对不起,玩玩,试一试&lt;/b&gt;&lt;/marqueE&gt;
 

Similar threads

后退
顶部