CHtmlView - zoom in/out on Ctrl + mouse scroll
-
How to implement the zoom in/out on Ctrl + mouse wheel scroll functionalities of IE browser in CHtmlView? Any ideas would be highly appreciable.. Regards
-- "Programming is an art that fights back!"
CHtmlView exposes all the functions of IWebBrowser2 interfce of WebBrowser activeX control, which it uses to browse the webpages. Its ExecWeb method is meant to control the commands such as SelectAll, Find, Zoom etc of IE.
CHtmlView::ExecWB
IWebBrowser2::ExecWB Method
see OLECMDID_ZOOM member of OLECMDID Enumeration
hope it helps. -
CHtmlView exposes all the functions of IWebBrowser2 interfce of WebBrowser activeX control, which it uses to browse the webpages. Its ExecWeb method is meant to control the commands such as SelectAll, Find, Zoom etc of IE.
CHtmlView::ExecWB
IWebBrowser2::ExecWB Method
see OLECMDID_ZOOM member of OLECMDID Enumeration
hope it helps.use OLECMDID_OPTICAL_ZOOM. define it as 63 if you get compile error. CComVariant vZoom((int)dZoomFactor); m_HTMLCtrl.ExecWB((OLECMDID)OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DODEFAULT, &vZoom, NULL);