How to add clipboard use to CHtmlView

First add menu item Edit, and then add Cut, Copy, Paste, and even Select All
to this menu. Then add the handlers to your CHtmlView class.

Easy…

void CWebBrowserView::OnEditCut()
{
ExecWB(OLECMDID_CUT, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
}

void CWebBrowserView::OnEditCopy()
{
ExecWB(OLECMDID_COPY, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
}

void CWebBrowserView::OnEditPaste()
{
ExecWB(OLECMDID_PASTE, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
}

void CWebBrowserView::OnEditSelectall()
{
ExecWB(OLECMDID_SELECTALL, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL);
}

More by Author

Must Read