如何在 VS Shell 中更改自定义编辑器选项卡上的标题

发布于 2024-07-23 08:11:29 字数 286 浏览 2 评论 0原文

我在 VS Shell 中实现了一个自定义编辑器(使用集成包)。 默认情况下,编辑器顶部的选项卡显示编辑器当前打开的文件名。 我说的是图像中红色箭头指向的文本:

alt text http ://img34.imageshack.us/img34/8559/tabtextsample.png

如何将其更改为我提供的内容?

I've implemented a custom editor in VS Shell (using an integration package). By default the tab at the top of the editor displays the file name that the editor has currently open.
I'm talking about the text the red arrow is pointing at in the image:

alt text http://img34.imageshack.us/img34/8559/tabtextsample.png

How do I change this to content I supply?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亽野灬性zι浪 2024-07-30 08:11:29

I believe that you would have to be the implementer of the project system. Essentially what happens is that the environment calls CreateEditorInstance on your IVsEditorFactory implementation. Then, the project system calls CreateDocumentWindow to actually open the document. The two parameters of CreateDocumentWindow that control the caption are pszOwnerCaption and pszEditorCaption. The latter is whatever you returned as the caption from CreateEditorInstance. The former is supplied by the project system. These two values are concatenated to form the final caption that is displayed to the user.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文