IWebBrowser2
-
Is there anyone out there using the ActiveX web browser control IWebBrowser2? I can't seem to get the horizontal scroll bar to go away?!?!?!
It's been a while since I worked with it, but as I remember you don't have much control over the scrollbars. The scrollbars appear automatically if the rendered HTML file is greater in width or height than the dimensions you've allowed for the control. Why not try making the displayed HTML page smaller?
-
It's been a while since I worked with it, but as I remember you don't have much control over the scrollbars. The scrollbars appear automatically if the rendered HTML file is greater in width or height than the dimensions you've allowed for the control. Why not try making the displayed HTML page smaller?
-
The HTML page is small...the horizontal scrollbar is appearing and is disabled when the page is small??? And for the life of me, I can't find a way to get rid if it?!?!
-
Try this (from ATL Internals) (also disables right click menu) CComPtr spAmbient; hr = m_axWebBrowser.QueryHost(&spAmbient); if(SUCCEEDED(hr)) { spAmbient->put_AllowContextMenu(VARIANT_FALSE); DWORD flags; spAmbient->get_DocHostFlags(&flags); spAmbient->put_DocHostFlags(flags | docHostUIFlagSCROLL_NO); }
-
Is there anyone out there using the ActiveX web browser control IWebBrowser2? I can't seem to get the horizontal scroll bar to go away?!?!?!
Two methods, 1. Turn it off with HTML ! either by navigating to the appropriate page or use MSHTML with insertAdjacentHTML method. 2. Alter the HostInfo After every Navigation the Control reloads the DocHost info STDMETHOD(GetHostInfo) (DOCHOSTUIINFO FAR *pInfo) { pInfo->cbSize = sizeof(DOCHOSTUIINFO); pInfo->dwFlags = DOCHOSTUIFLAG_SGROLL_NO; return S_OK; } Hope this helps somehow!