Florian Leitgeb
Florian Leitgeb

Reputation: 16664

IDocHostUIHandler TranslateAccelerator not allowing keyboard input

I implemented an AxWebBrowser control and added the IDocHostUIHandler to my Document at Navigation for custom contextmenu.

After research i found out that i have to

throw new System.Runtime.InteropServices.COMException("", 1); 

in the implementation of the TranslateAccelerator function, to calrify that i dont handle keyboard inputs.

First it worked, but today i compiled and Visual Studio is breaking with a first chance expression and keyboard inputs are not recognized anymore.

Background: used the approach to implement the interface like described in this link: http://www.codeproject.com/Articles/2491/Using-MSHTML-Advanced-Hosting-Interfaces

Upvotes: 2

Views: 380

Answers (1)

Florian Leitgeb
Florian Leitgeb

Reputation: 16664

Found the answer. The problem was that i implemented ProcessCMDKey in my class which extends AxWebBrowser which is used in my manager class that implements the IDocHostUIHandler.

Just remove ProcessCMDKey and it works again.

Upvotes: 1

Related Questions