如何在内部显示点项目的路径 [英] How can I display a path to my projects with dots inside

查看:95
本文介绍了如何在内部显示点项目的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中我的静态文本(在我们的首页)中,我可以显示如下所示的项目路径:

C:\ MyProject \ Something \FilesF ...



我想在路径中有点看到最后一个目录。



什么我试过了:



对于我的静态文本控件,我设置了这样的属性:

路径省略号,单词省略号, End Ellipsis = true



我可以通过属性设置它还是应该以其他方式设置?

In my static text (in our startpage) in visual studio I can display path to my project like this below:
C:\MyProject\Something\FilesF...

I'd like to have dots inside the path to see the last catalogue.

What I have tried:

For my static text control I have set properties like this:
path ellipsis , word ellipsis ,End Ellipsis = true

Can I set this by properties or it should be done other way?

推荐答案

你不应该设置所有三个属性,因为它们是独占的:

You should not set all three properties but only one of them because they are exclusive:
#define SS_ENDELLIPSIS      0x00004000L
#define SS_PATHELLIPSIS     0x00008000L
#define SS_WORDELLIPSIS     0x0000C000L
#define SS_ELLIPSISMASK     0x0000C000L

因此设置所有这些与 SS_WORDELLIPSIS 相同,这会导致最后的省略号与pathes tha t不包含空格。



如果你想手动完成,可以使用Shell PathCompactPath函数(Windows) [ ^ ] function。

So setting all of them is the same as SS_WORDELLIPSIS which results in ellipses at the end with pathes that did not contain spaces.

If you want to do it manually you can use the Shell PathCompactPath function (Windows)[^] function.


这篇关于如何在内部显示点项目的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆