visual-studio-addins

Language for Text View in VS2010 Extension

I'm new to building addins for Visual Studio, but have managed to build a simpe tool for VS2010 that does a little text manipulation in the currently active code window. I've got to the point where I need to know the language (VB.Net, C# or whatever) of the current text view. I have tried to get the filename (so I can look at the extens...

Why does creating multiple Tool Windows breaks other tool windows dockable state

I have a simple Visual Studio AddIn that exposes documentation and snippets, each on a separate tool windows. Both use the same UserControl. At any time, the user can double-click on document items inside the tool window to open the document item inside another Tool Window, that shows up in Visual Studio's documents zone (right next to t...

How to Categorize Visual Studio AddIn Commands

I would like my AddIn commands to appear their own category, in the tools menu's customize dialog. Right now, they appear under the Addins category. ...

Why I cannot call the interface of Release of a COM object

I'm develop a VC Add-In for VC6 and VC9. The following codes are from my works. In CViaDevStudio::Evaluate, after I call pDebugger->Release() and it's all OK. But in CViaVisualStudio::ReadFromMemory, after I call pDebugger->Release() or pProc->Release(), VC9 will prompt a error complaint a unspecified error number. I don't know why. I th...

How to get the executable file name throng Developer Studio object

I'm develop a Add-In for VC6. (Oh, I've asked many questions about it.:)) I should get the active process ID in debug. Now I took project's name as process name to get the process ID. But it will failed if the process name is not same as the project's name. So I want to get the executable file name, that is in Project Settings'->Debug->E...

How do I specify my own bitmap image in a call to Commands2.AddNamedCommand2?

I'm writing a Visual Studio add-in and have a 16x16 bitmap resource that I would like to use as the button image for my menu item. Following these instructions from the MSDN, I renamed the resource 1 and the file 1.bmp, then edited Resources.resx accordingly: <data name="1" type="System.Resources.ResXFileRef, System.Windows.Forms"> ...

How do I determine if a VSLangProj.Reference is a Project Reference or a File Reference?

I am working on a Visual Studio plug-in. Given a VSLangProj.Reference, is there a way to programmatically determine if that reference is a project reference or a file reference? ...

create VS 2008 Add-in as a right click menu for a class file

How can i create a right click menu for VS 2008\10 that will be specific for a class file? ...

Why I lost input focus in visual studio 2005/2008

I wrote a Add-In for Visual Studio 2005/2008. It will prompt a window with some edit controls as child windows. But if open VS with a document and then open my Add-In, those child edit controls will lose input focus when type Tab/Delete/Backsapace/Ctrl-C etc. without any document and then open my Add-In, it is OK. I think I found th...

The difference between a window created in main thread and a window created in another thread

Another question about my add-in for visual studio. Now, I had two experiments as following: In my add-in library's main thread, I call CreateWindowEx to create a window(or CreateDialogParam to create a modeless dialog) and call CreateThread to create a thread where the window's message loop is running. Then I will have a problem I've ...