Prevent scaling CDHTMLDialog (BHO in IE)

I have a CDHTMLDialog running in IE that has a fixed size that I have chosen and runs in a fixed window to fit that size.

My problem is that the user can enlarge it (ctrl-mousewheel), causing my html to be larger or smaller than the window, which looks awkward and adds annoying scrollbars. Alternatively, the user can use ctrl- + or ctrl-- to resize the html, which also causes my CDHTMLDialog to get bigger or smaller (albeit only when navigating after resizing).

Anyone have an idea on how to prevent all scaling on the CDHTMLDialog including wheel and ctrl - +?

+2


source to share


1 answer


Found :)

After completing the document, I run the following:

CComVariant vZoom = 100;
m_pBrowserApp->ExecWB(OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DODEFAULT,&vZoom, NULL);

      



Resets the scale of my DHTMLDialog to 100%.

Source: Here

+1


source







All Articles