> Both of these are legitimate samples, but neither actually illustrates how
> to host the core VS editor. To do that you need to create an instance of
> the COM creatable VsCodeWindow object, and wire it to a COM creatable
> VsTextBuffer. You can to this in both VC++ and C#, but in the C# scenario
> you'll have to parent the HWND of the VsCodeWindow directly to your editor
> pane by PInvoking the SetParent API in USER32.DLL.
I'm interested in this, too. However, I can't find any references to
VsTextBuffer or VsCodeWindow in the VS 2005 documentation. Where can one
find information about them?
Basically, I'm wanting to create an add-in that will create a simple,
blank document without any dialog intervention. This would be identical
to the way VC++ 6.0 editor's "New Text File" toolbar button operates.
Would using these interfaces (VsTextBuffer and VsCodeWindow) be the way to
do that? If not, is there a method somewhere that just opens a new,
blank, no questions asked, text window.
Thanks,
Brian
"Ed Dore [MSFT]" - 13 Jan 2006 18:36 GMT
Hi Brian,
Those components are actually documented in the Visual Studio SDK, and are
typically utilized when building a new editor to support a new language or
sourcefile type. You can download the Visual Studio SDK from:
https://affiliate.vsipmembers.com/.
If you're just looking to create a toolbar button that will create a new
textfile, you can do this via a macro or an addin by way of the
DTE.ItemOperations.NewFile function. Specifically:
DTE.ItemOperations.NewFile("General\Text File")
Sincerely,
Ed Dore [MSFT]
This post is 'AS IS' with no warranties, and confers no rights.