Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Implementing IOleCommandTarget stops all Visual Studio commands when my window has focus

$
0
0

Hello,

In my visual studio extension, I have a Tool window Pane which implements IOleCommandTarget. I'm not currently doing anything in these functions, just returning S_OK (0), however whenever my tool window has focus in Visual Studio it stops all other Visual Studio commands from working, I can't open a file form the menu, I can't exit etc.

I'm guessing there is something special I need to do in my overridden QueryStatus function to say that i'm not handling other commands, but I'm not sure what. Could someone tell me of the correct implementation of IOleCommandTarget please?

thanks,

Stewart.

class MyToolWindowPane : ToolWindowPane, IOleCommandTarget
{
	public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
	{
		return 0;
	}

	public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
	{
		return 0;
	}



Viewing all articles
Browse latest Browse all 4410

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>