+2  A: 

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.

Aaron Marten
Thanks. I am implementing a project system. But how do I supply the pszOwnerCaption information to the CreateDocumentWindow call?
Rotem

related questions