CPathT::CompactPath

Call this method to truncate a file path to fit within a given pixel width by replacing path components with ellipses.

BOOL CompactPath( 
   HDC hDC, 
   UINT nWidth  
);

Parameters

  • hDC
    The device context used for font metrics.

  • nWidth
    The width, in pixels, that the string will be forced to fit in.

Return Value

Returns TRUE on success, FALSE on failure.

Remarks

For more information, see PathCompactPath.

Requirements

Header: atlpath.h

See Also

Reference

CPathT Class

CPathT::CompactPathEx