Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How can I query the "keep open" state of a document tab?

$
0
0

Hello,

I am trying to create an extension (VSPackage) that is going to do stuff when a *c/*.cpp/*h/*hpp document is opened in Visual Studio. By "opened" I mean when a user has opened the document by double-clicking on it and not when it appears on the right-side of the Visual studio window because the user has clicked on the document (in solution explorer) once.

My first attempt is trying to catch the events from IVsRunningDocTableEvent. The problem is that although I get the events in the OnBeforeDocumentWindowShow method - I get them more than once for the same document?

Can anyone explain why this is happening?

Is there anyway to query the "keep open" state of the document? The IVsWindowFrame.IsOnScreen and IVsWindowFrame.IsVisible does not help.

I also tried out the VSFPROPID_IsWindowTabbed property and I get the value 1 (tabbed and active) more than once for the same document.

Thank you

Kind Regards,

Sami



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>