Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top