How to disable right click for IWebBrowser2 (C++)

362 Views Asked by At

I embedded a web browser in MFC dialog by using IWebBrowser2 class. Every time when the dialog is opened, this browser will display a pdf. However, when I right click on this pdf, it will have the context menu. I don't want the web browser has the context menu, is there any way for me to disable it? I tried to edit pdf content, but seems like there is not way to disable the right click by editing the pdf. By checking the interface of IWebBrowser2 and its parent class, I didn't seen any API like OnRightClickButton etc.

I use PreTranslateMessage in the dialog, but it cannot be triggered when I right click on the web browser

0

There are 0 best solutions below