Using Win32 functions in Visual FoxPro Image Gallery
Shell Lightweight Utility APIs -- Path Functions
..msdn
PathBuildRoot
PathCombine
PathCompactPathEx
PathFileExists
PathFindExtension
PathFindFileName
PathFindOnPath
PathGetDriveNumber
PathGetShortPath
PathIsDirectory
PathIsNetworkPath
PathIsRelative
PathIsRoot
PathIsURL
PathRenameExtension
PathSearchAndQualify
UrlEscape
UrlGetPart
UrlHash
UrlUnescape
Code examples:
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-06-06 11:57:59
Modified: 2007-06-11 16:02:24
Visited in last 7 days: 14
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.221.73.186)
20 sec.Function: 'GdipDeleteStringFormat'
39 sec.Function: 'NetShareEnum'
1.1 min.Function: 'DeleteFile'
2.63 min.Function: 'WriteConsole'
Google
Advertise here!