views:

175

answers:

1

I have a CDHTMLDialog running in IE that has a fixed size that I chose, and runs in a fixed window to match this size.

My problem is that the user can zoom on it (by ctrl-mousewheel) causing my html to be larger or smaller than the window which looks awkward and adds annoying scrollbars. Also, the user might use ctrl-+ or ctrl-- to change the html size, which also causes my CDHTMLDialog to become larger or smaller (though only on navigation after changing size).

Anyone maybe has an idea on how to prevent all zooms on the CDHTMLDialog, including wheel and ctrl-+?

+1  A: 

Found it :)

Upon document complete I run the following:

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

Which resets zoom in my DHTMLDialog to 100%.

Source: Here

Neko