共用方式為


CLinkCtrl::GetItemUrl

Retrieves the URL represented by the link control item.

BOOL GetItemUrl(
   int iLink,
   CString& strUrl 
) const;
BOOL GetItemUrl(
   int iLink,
   LPWSTR szUrl,
   UINT cchUrl 
) const;

Parameters

  • iLink
    The index of a link control item.

  • strUrl
    A CStringT object containing the URL represented by the specified item

  • szUrl
    A null-terminated string containing the URL represented by the specified item

  • cchUrl
    The size in characters of the szURL buffer.

Return Value

Returns TRUE on success, FALSE on failure.

注意

This function also returns FALSE if the buffer of szUrl or strUrl is smaller than MAX_LINKID_TEXT.

Remarks

Retrieves the URL represented by the specified link control item. For more information, see the Win32 message LM_GETITEM in the Windows SDK.

Requirements

Header: afxcmn.h

See Also

Concepts

CLinkCtrl Class

CLinkCtrl Members

Hierarchy Chart

CLinkCtrl::SetItemUrl

CLinkCtrl::GetItem