Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IWebBrowser2

IWebBrowser2

Scheduled Pinned Locked Moved C / C++ / MFC
comquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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?!?!?!

    L B 2 Replies Last reply
    0
    • L Lost User

      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?!?!?!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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?

      L 1 Reply Last reply
      0
      • L Lost User

        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?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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?!?!

        L 1 Reply Last reply
        0
        • L Lost User

          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?!?!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Weird. I'll ask around and see of one of my fellow developers knows the reason.

          T 1 Reply Last reply
          0
          • L Lost User

            Weird. I'll ask around and see of one of my fellow developers knows the reason.

            T Offline
            T Offline
            TBK
            wrote on last edited by
            #5

            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); }

            1 Reply Last reply
            0
            • L Lost User

              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?!?!?!

              B Offline
              B Offline
              Buck
              wrote on last edited by
              #6

              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!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups