AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

PathCompactPath

Truncates a file path to fit within a given pixel width by replacing path components with ellipses.

VB4-32,5,6
Declare Function PathCompactPath Lib "shlwapi.dll" Alias "PathCompactPathA" (ByVal hDC As Long, ByVal pszPath As String, ByVal dx As Long) As Long

Operating Systems Supported
Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later); Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later)

Library
Shlwapi

Parameter Information
· hDC
Handle to the device context used for font metrics.

· lpszPath
Address of a buffer containing the path string to be modified. The buffer must be at least MAX_PATH characters long. On return, this buffer will contain the modified string.

· dx
Width, in pixels, within which the string will be forced to fit.

Return Values
Returns TRUE if the path was successfully compacted to the specified width. Returns FALSE on failure, or if the base portion of the path would not fit the specified width

Examples

Related Functions

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/