Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / October 2004

Tip: Looking for answers? Try searching our database.

ToolWindow with IVsUIHierarchy in managed code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hannes Danzl[NDD] - 16 Oct 2004 08:27 GMT
How exactly to I implement this in C#?

I've created my package and implemented the interface methods in

public class MyToolWindow : ToolWindowPane, IVsUIHierarchy

as stub methods for the moment. Putting Trace writes in these methods
shows me that they never get triggered.

Does anyone have a working example for this?

The background: I want to create my own toolwindow with a Hierarchy
view. I want to be able to drag and drop items from this list into the
Forms designer or editor and then do some things with (mostly)
serialization. My understanding was that a toolwindow with hierarchy
interface should provide this functionality. UNfortunately this seems
to be a complete grey area as searching on Google, MSDN and Online Help
doesn't return anything really helpful. Also running the Data and
Crystal assemblies through reflector didn't open my eyes.

If that's not possible in managed code, does someone have an example in
C++?

Thanks for ANY pointers

Signature

Hannes Danzl [NexusDB Developer]
Newsgroup archive at http://www.tamaracka.com/search.htm

"Rusty Deschenes [MS]" - 18 Oct 2004 21:51 GMT
Hello Hannes,

Your class deriving from ToolWindowPane does not have to derive from
IVsUiHierarchy.
What it needs is the following:
 1) In the constructor, set ToolClsid to
NativeMethods.CLSID_VsUIHierarchyWindow  (
7d960b07-7af8-11d0-8e5e-00a0c911005a )
 2) Overide OnToolWindowCreated with the following implementation:
     - call the base class implementation
     - get the docview property from the window frame
     - cast (QI) the returned object (docview) to an IVsUIHierarchyWindow
     - call Init() on the IVsUIHierarchyWindow (that is when you pass in
your hierarchy)

This should be all there is to it (beside of course implementing your
hierarchy).

Rusty
Signature

--
Rusty Deschenes [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.

Hannes Danzl[NDD] - 18 Oct 2004 22:47 GMT
> Hello Hannes,
>
[quoted text clipped - 13 lines]
> This should be all there is to it (beside of course implementing your
> hierarchy).

Thanks Rusty! I'll give it a shot.

Signature

Hannes Danzl [NexusDB Developer]
Newsgroup archive at http://www.tamaracka.com/search.htm


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.