I am using the google project code.
https://code.google.com/p/chromiumembedded/
I went to http://cefbuilds.com/ and downloaded the following cef_binary_3.1846.1637_windows64
I added a new class that SimpleHandler inherited from (CefContextMenuHandler)
- Code: Select all
class SimpleHandler : public CefClient,
public CefContextMenuHandler,
public CefDisplayHandler,
public CefLifeSpanHandler,
public CefLoadHandler {
Then I overrode the 2 virtual methods for testing purposes (but they don't work)
- Code: Select all
void SimpleHandler::OnBeforeContextMenu(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) {
REQUIRE_UI_THREAD();
model->Clear();
}
bool SimpleHandler::OnContextMenuCommand(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) {
REQUIRE_UI_THREAD();
MessageBox(browser->GetHost()->GetWindowHandle(), L"The requested action is not supported", L"Unsupported Action", MB_OK | MB_ICONINFORMATION);
return false;
}