📄 shelllink.htm
字号:
<p> </p>
<p><a name="CShellLink::Create"></a><big><strong><font face="Arial">CShellLink::Create</font></strong></big></p>
<p><font face="Arial"><strong>BOOL CShellLink::Create(const CShellLinkInfo& </strong><em>sli</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sli</em> The structure which contains all the parameters to use
in the shortcut. They will be updated on disk following a call to <a
href="#CShellLink::Save">CShellLink::Save</a>.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to initialise the shortcut with initial
values.</font></p>
<p> </p>
<p><a name="CShellLink::Load"></a><font face="Arial"><big><strong>CShellLink::Load</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CShellLink::Load(const CString& </strong><em>sFilename</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sFilename</em> The filename from which to load the shortcut
information. Normally this will have the extension ".lnk".</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to load up a shortcut from disk.</font></p>
<p> </p>
<p><font face="Arial"><a name="CShellLink::Save"></a><big><strong>CShellLink::Save</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CShellLink::Save(const CString& </strong><em>sFilename</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sFilename</em> The filename to save this shortcut to. Normally
this will have the extension ".lnk".</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to save a shortcut to disk. Prior to
calling this function you would normally call <a href="#CShellLink::Create">CShellLink::Create</a>
method.</font></p>
<p> </p>
<p><a name="CShellLink::Resolve"></a><font face="Arial"><big><strong>CShellLink::Resolve</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CShellLink::Resolve(CWnd* </strong><em>pParentWnd</em><strong>,
DWORD </strong><em>dwFlags</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>pParentWnd</em> The parent window of a window that the shell
uses as the parent window for a dialog box. The shell displays the dialog box if it needs
to prompt the user for more information while resolving a shell link</font></p>
<p><font face="Arial"><i>fFlags</i> Action flags. This parameter can be a combination of
the following values: </font></p>
<table>
<TBODY>
<tr vAlign="top">
<td><font face="Arial" size="2">SLR_ANY_MATCH </font></td>
<td><font face="Arial" size="2">Resolves the link, displaying a dialog box if the system
needs information from the user. </font></td>
</tr>
<tr vAlign="top">
<td><font face="Arial" size="2">SLR_NO_UI </font></td>
<td><font face="Arial" size="2">Prevents the shell from displaying a dialog box if it
cannot resolve the shell link. When this flag is specified, the high-order word of <i>fFlags</i>
specifies a timeout duration, in milliseconds. The function returns if the link cannot be
resolved within the timeout duration. If the high-order word is set to zero, the timeout
duration defaults to 3000 milliseconds (3 seconds). </font></td>
</tr>
<tr vAlign="top">
<td><font face="Arial" size="2">SLR_UPDATE </font></td>
<td><font face="Arial" size="2">Directs the shell to update the path to the link and the
list of identifiers if the link object has been changed. If this value is used, it is not
necessary to call the <em>IPersistFile::IsDirty</em> method to determine whether the link
object has changed. </font></td>
</tr>
</TBODY>
</table>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to ensure that a shortcut is pointing to
valid data. This is known as "resolving" a shortcut. For those who frequently
move files from volume to volume, the Searching for Shortcut dialog should be familiar.</font></p>
<p> </p>
<p><a name="CUrlShellLink::Create"></a><font face="Arial"><big><strong>CUrlShellLink::Create</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CUrlShellLink::Create(const CShellLinkInfo& </strong><em>sli</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sli</em> The structure which contains all the parameters to use
in the shortcut. They will be updated on disk following a call to <a
href="#CUrlShellLink::Save">CUrlShellLink::Save</a>.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to initialise the shortcut with initial
values.</font></p>
<p> </p>
<p><font face="Arial"><a name="CUrlShellLink::Load"></a><big><strong>CUrlShellLink::Load</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CUrlShellLink::Load(const CString& </strong><em>sFilename</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sFilename</em> The filename from which to load the shortcut
information. Normally this will have the extension ".url".</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to load up a shortcut from disk.</font></p>
<p> </p>
<p><a name="CUrlShellLink::Save"></a><font face="Arial"><big><strong>CUrlShellLink::Save</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CUrlShellLink::Save(const CString& </strong><em>sFilename</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>sFilename</em> The filename to save this shortcut to. Normally
this will have the extension ".url".</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to save a shortcut to disk. Priot to
calling this function you would normally call <a href="#CUrlShellLink::Create">CUrlShellLink::Create</a>
method.</font></p>
<p> </p>
<p><a name="CUrlShellLink::Invoke"></a><font face="Arial"><big><strong>CUrlShellLink::Invoke</strong></big></font></p>
<p><font face="Arial"><strong>BOOL CUrlShellLink::Invoke(CWnd* </strong><em>pParentWnd</em><strong>,
DWORD </strong><em>dwFlags</em><strong>, const CString& </strong><em>sVerb</em><strong>);</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>pParentWnd</em> Handle to the parent window. If <b>dwFlags</b>
is set to IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB, this member is ignored. </font></p>
<p><font face="Arial">dwFlags Flag value that specifies how the
IUniformResourceLocator::InvokeCommand method will execute. This value can be a
combination of the following: </font></p>
<table border="0">
<tr>
<td width="419"><small><font face="Arial">IURL_INVOKECOMMAND_FL_ALLOW_UI</font></small></td>
<td width="680"><small><font face="Arial">Interaction with the user is allowed and the <em>pParentWnd</em>
parameter is valid. If this is not set, interaction with the user is not allowed and the <em>pParentWnd</em>
member is ignored. </font></small></td>
</tr>
<tr>
<td width="419"><small><font face="Arial">IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB </font></small></td>
<td width="680"><small><font face="Arial">Default verb for the Internet Shortcut's
protocol is to be used and the <em>sVerb</em> parameter is ignored. If this bit is not
set, the verb is specified by <em>sVerb</em>. </font></small></td>
</tr>
</table>
<p><font face="Arial"><em>sVerb</em> string that contains the verb to be invoked by
IUniformResourceLocator::InvokeCommand. If <em>dwFlags</em> is set to
IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB, this parameter is ignored. </font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Call this member function to perform an action on a URL. The most
common action would be to open it, which will open it up in your default web browser. You
could also use the "edit" verb assuming you had a HTML editor open.</font></p>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><a name="Contact"></a><font color="#000000" size="4"><strong>CONTACTING
THE AUTHOR</strong></font></font></p>
<p><font color="#000000" size="3" face="Arial">PJ Naughter<br>
Email: <a href="mailto:pjn@indigo..ie">pjn@indigo.ie</a><br>
Web: <a href="http://indigo.ie/~pjn">http://indigo.ie/~pjn</a><br>
12th December 1998</font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -