怎样将长字符串转换为包含"..."的字符串?

cdws222 2002-11-07 10:02:07
例:c:\windows\system32\fjdal;\dfsa\fds\af\dsa\fd\sa\fd\sa
->c:\windows\...\sa
...全文
18 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
invalid 2002-11-07
  • 打赏
  • 举报
回复
API函数DWORD GetShortPathName(

LPCTSTR lpszLongPath, // points to a null-terminated path string
LPTSTR lpszShortPath, // points to a buffer to receive the null-terminated short form of the path
DWORD cchBuffer // specifies the size of the buffer pointed to by lpszShortPath
);
invalid 2002-11-07
  • 打赏
  • 举报
回复
试试:AnsiString __fastcall MinimizeName(constAnsiString Filename, Graphics::TCanvas* Canvas, int MaxLen);

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧