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

How does the VSStd97CmdID.Find command work?

$
0
0

Hi,

I am developing an extension for Visual Studio 2012.

I used an IVsTextViewCreationListener to add a IOleCommandTarget to a text editor. I am trying to use it to capture user action, especially search operations.

When the Search command is invoked (Ctrl-F), the Exec method of the IOleCommandTarget receives the VSStd97CmdID.Find command (or, when the instant search is invoked (Ctrl-I), the VSStd2KCmdID.ISEARCH command).

Then as text is typed into the search box, the search progresses and the matching text is being selected in the editor. However at that point no command is going through the Exec method.

If the Find Next or Find Previous commands are invoked, appropriate commands are received (VSStd97CmdID.FindNext and VSStd97CmdID.FindPrevious).

However, none of these commands receive an argument, and the text being typed in the search do not generate the TYPECHAR command (which seems quite reasonable since characters aren't being typed in the editor but in the search box).

So I am wondering how I could find out what text is being searched for. I am guessing it must all be happening at a higher level than the text editor, but are there any hooks to get there?

Thank you for your help.



Viewing all articles
Browse latest Browse all 4410

Trending Articles