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. ScrollWindow

ScrollWindow

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
5 Posts 2 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.
  • J Offline
    J Offline
    jeremysay
    wrote on last edited by
    #1

    hello, I use Scroll window to scroll a view in child window. how to "ScrollTo(0,0)", i want to reposition my view. i have already use SetWindowPos(0,0,0,0,0,SWP_NOSIZE), but it seems doesn't work. thx in advance

    B 1 Reply Last reply
    0
    • J jeremysay

      hello, I use Scroll window to scroll a view in child window. how to "ScrollTo(0,0)", i want to reposition my view. i have already use SetWindowPos(0,0,0,0,0,SWP_NOSIZE), but it seems doesn't work. thx in advance

      B Offline
      B Offline
      Brian Shifrin
      wrote on last edited by
      #2

      SetScrollPos

      J 1 Reply Last reply
      0
      • B Brian Shifrin

        SetScrollPos

        J Offline
        J Offline
        jeremysay
        wrote on last edited by
        #3

        thx but i work with CHtmlView and i can't use SetScrollPos without error :( another idea ? thx again

        B 1 Reply Last reply
        0
        • J jeremysay

          thx but i work with CHtmlView and i can't use SetScrollPos without error :( another idea ? thx again

          B Offline
          B Offline
          Brian Shifrin
          wrote on last edited by
          #4

          CHtmlView ... BOOL CMyHtmlView::ScrollTop( LPDISPATCH pdispDoc, // The HTML document to scroll BOOL bScrollTop) // TRUE=top;FALSE=bottom { CComQIPtrpiDoc(pdispDoc); CComPtrpiWindow; return (piDoc && SUCCEEDED(piDoc->get_parentWindow( &piWindow)) && piWindow && SUCCEEDED(piWindow->scroll( 0, (bScroll) ? LONG_MIN : LONG_MAX))); }

          J 1 Reply Last reply
          0
          • B Brian Shifrin

            CHtmlView ... BOOL CMyHtmlView::ScrollTop( LPDISPATCH pdispDoc, // The HTML document to scroll BOOL bScrollTop) // TRUE=top;FALSE=bottom { CComQIPtrpiDoc(pdispDoc); CComPtrpiWindow; return (piDoc && SUCCEEDED(piDoc->get_parentWindow( &piWindow)) && piWindow && SUCCEEDED(piWindow->scroll( 0, (bScroll) ? LONG_MIN : LONG_MAX))); }

            J Offline
            J Offline
            jeremysay
            wrote on last edited by
            #5

            thx for your help :) but i don't want to use the scrollbar of CHtmlView, there are a lot of problem with there (i can't control scrollbar with some web site). I search a function like "ScrollTo(X,Y)" but it seems it doesn't exist :(( thank you nevertheless

            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