locked
how to dock a CreateToolWindow2 window RRS feed

  • Question

  • how do I make it so the tool window I create using CreateToolWindow2 will be docked just like the output window or debug locals window is docked?

    I read in a search that I should set the windowFrame to VSFM_MidiChild.  But I do not know where to find the windowFrame property.

    thanks,

     

    Sunday, February 5, 2012 12:17 AM

Answers

  • Hi Steve,

    Did you install the Visual Studio SDK for using Microsoft.VisualStudio.Shell.Interop assembly? If not, please download and install the last Visual Studio 2010 SP1 SDK from http://www.microsoft.com/download/en/details.aspx?id=21835

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Steve Richter Saturday, February 11, 2012 12:06 AM
    • Unmarked as answer by Steve Richter Sunday, February 12, 2012 7:58 PM
    • Marked as answer by Steve Richter Sunday, February 12, 2012 7:58 PM
    Friday, February 10, 2012 8:04 AM
  • how do I make it so the tool window I create using CreateToolWindow2 will be docked just like the output window or debug locals window is docked?

    to make a window dockable set the IsFloating property of the EnvDTE.Window object to false. Also, maybe set the Linkable property to true.

    • Marked as answer by Steve Richter Sunday, February 12, 2012 5:39 PM
    Sunday, February 12, 2012 5:39 PM

All replies

  • I don't see a way to go from DTE::Window to IVsWindowFrame. You can use IVsUIShell::FindToolWindow to get the IVsWindowFrame. I assume this is for an AddIn? As packages don't normally create toolwindows in this manner.

    Ryan

    Sunday, February 5, 2012 6:08 PM
  • I don't see a way to go from DTE::Window to IVsWindowFrame. You can use IVsUIShell::FindToolWindow to get the IVsWindowFrame. I assume this is for an AddIn? As packages don't normally create toolwindows in this manner.

    Ryan

    Yes, an addin.  I have a visual studio addin that is handling the DebuggerEvents.OnEnterBreakMode event. Then when a breakpoint is hit I fill a CreateToolWindow2 window with the Locals expressions of the Debugger.CurrentStackFrame.   I want to dock this window of mine as a replacement for the Locals window that is docked at the bottom of visual studio when the code stops at a breakpoint.

    The problem I am having now is finding the assembly for IVSUIShell::FindToolWindow . My AddIn is coded in C#.  When I try to add a reference to Microsoft.VisualStudio.Shell.Interop I do not find that assembly listed in Add Reference / .NET tab.

    Thursday, February 9, 2012 9:07 PM
  • Hi Steve,

    Did you install the Visual Studio SDK for using Microsoft.VisualStudio.Shell.Interop assembly? If not, please download and install the last Visual Studio 2010 SP1 SDK from http://www.microsoft.com/download/en/details.aspx?id=21835

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Steve Richter Saturday, February 11, 2012 12:06 AM
    • Unmarked as answer by Steve Richter Sunday, February 12, 2012 7:58 PM
    • Marked as answer by Steve Richter Sunday, February 12, 2012 7:58 PM
    Friday, February 10, 2012 8:04 AM
  • how do I make it so the tool window I create using CreateToolWindow2 will be docked just like the output window or debug locals window is docked?

    to make a window dockable set the IsFloating property of the EnvDTE.Window object to false. Also, maybe set the Linkable property to true.

    • Marked as answer by Steve Richter Sunday, February 12, 2012 5:39 PM
    Sunday, February 12, 2012 5:39 PM