C# Path Ellipsis without Win32 API call

…衆ロ難τιáo~ 提交于 2019-12-01 09:19:50
Logan Capaldo

Your own link has

Alternative Managed API: System.Windows.Forms.TextRenderer.MeasureText(String, Font, Size, TextFormatFlags.ModifyString | TextFormatFlags.PathEllipsis);

at the bottom. Is that what you are looking for?

casterle

Using the ModifyString flag in versions of .Net since (at least) version 3.5 exposes an ugly and potentially dangerous bug discussed here.

Hans Passant found the correct way to do this here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!