locked
Is there a way to ...? RRS feed

  • Question

  • To programmically access the visual studio's solution explore treeview control  that was used to genereate the solution tree?

    What i am askign is, is there a way to gain acess to the pointer or hWnd pointer of solution tree in soloution explore? i already can gain acess to the soloution explore window's hwnd, but what i want is a pointer to its tree control


    Thanks,
    amir

    Software Developer
    Wednesday, December 10, 2008 2:46 PM

Answers

  • Hi Amir,

    There is no supported way to do this. There are automation and internal interfaces that can be leveraged, but you should not be attempting to manipulate the control directly. That's not supported, nor recommended. As any changes you make could severely impact the behavior of the control as it interacts with the underlying project system(s).

    It would be better to try and leverage the existing automation interface like EnvDTE::UIHierarchy and EnvDTE::UIHierarchyItem, or the lower level IVsUIHierarchy and IVsUIHierarchyWindow interfaces.

    Sincerely,
    Ed Dore
    Wednesday, December 10, 2008 9:23 PM

All replies

  • Hi Amir,

    There is no supported way to do this. There are automation and internal interfaces that can be leveraged, but you should not be attempting to manipulate the control directly. That's not supported, nor recommended. As any changes you make could severely impact the behavior of the control as it interacts with the underlying project system(s).

    It would be better to try and leverage the existing automation interface like EnvDTE::UIHierarchy and EnvDTE::UIHierarchyItem, or the lower level IVsUIHierarchy and IVsUIHierarchyWindow interfaces.

    Sincerely,
    Ed Dore
    Wednesday, December 10, 2008 9:23 PM
  • Hi Amir,

    Maybe you could ellaborate why do you want to do that... because maybe there are other ways of solving your problem.

    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about VS extensibility: http://msmvps.com/blogs/carlosq/
    Thursday, December 11, 2008 8:26 AM