 |
PathCompactPathEx ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Truncates a path to fit within a certain number of characters by replacing path components with ellipses. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL PathCompactPathEx(
LPTSTR pszOut,
LPCTSTR pszSrc,
UINT cchMax,
DWORD dwFlags
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER PathCompactPathEx IN shlwapi;
STRING @pszOut,;
STRING pszSrc,;
LONG cchMax,;
LONG dwFlags
|
 |
 |
 |
| Parameters: |
 |
pszOut
[out] The address of the string that has been altered.
pszSrc
[in] A pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be altered.
cchMax
[in] The maximum number of characters to be contained in the new string, including the terminating NULL character.
dwFlags
Reserved.
|
 |
 |
| Return value: |
 |
Returns TRUE if successful, or FALSE otherwise.
|
 |
 |
| Usage: |
 |
* returns C:\Program Files\Microsoft ...\vfp9.exe
LOCAL cSrc, cDst
cSrc = _vfp.ServerName
cDst = REPLICATE(CHR(0), LEN(cSrc))
IF PathCompactPathEx(@cDst, cSrc, 40, 0) <> 0
cDst = STRTRAN(m.cDst, CHR(0), "")
? cDst
ENDIF
|
 |
 |
| My comment: |
 |
To me the ellipses look rather like dots.
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2007-06-06 11:57:59 | | Modified: | 2007-06-11 16:02:24 | Visited in last 7 days: 14 |