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. Problems with WM_VSCROLL PostMessage

Problems with WM_VSCROLL PostMessage

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • G Offline
    G Offline
    Greg Ellis
    wrote on last edited by
    #1

    Hi everyone, I am trying to scroll a window by more than one unit at a time. currently I am doing this [CODE] for(int i=0; i<100; i++) pParent->m_SkinList.PostMessage(WM_VSCROLL, MAKELONG(SB_LINEDOWN,0),NULL); [/CODE] I have my current code inside a for loop to make it scroll down multiple times and it works, but it freezes up my app until the for loop is done. How can I scroll by multiple lines using a single PostMessage call? Can I scroll variably in a single call without using a for loop? Thanks, Greg

    PJ ArendsP I 2 Replies Last reply
    0
    • G Greg Ellis

      Hi everyone, I am trying to scroll a window by more than one unit at a time. currently I am doing this [CODE] for(int i=0; i<100; i++) pParent->m_SkinList.PostMessage(WM_VSCROLL, MAKELONG(SB_LINEDOWN,0),NULL); [/CODE] I have my current code inside a for loop to make it scroll down multiple times and it works, but it freezes up my app until the for loop is done. How can I scroll by multiple lines using a single PostMessage call? Can I scroll variably in a single call without using a for loop? Thanks, Greg

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      The HIWORD of the wParam parameter is the position to scroll to

      pParent->m_SkinList.PostMessage(WM_VSCROLL, MAKELONG(SB_LINEDOWN,nPos),NULL);


      [

      ](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      • G Greg Ellis

        Hi everyone, I am trying to scroll a window by more than one unit at a time. currently I am doing this [CODE] for(int i=0; i<100; i++) pParent->m_SkinList.PostMessage(WM_VSCROLL, MAKELONG(SB_LINEDOWN,0),NULL); [/CODE] I have my current code inside a for loop to make it scroll down multiple times and it works, but it freezes up my app until the for loop is done. How can I scroll by multiple lines using a single PostMessage call? Can I scroll variably in a single call without using a for loop? Thanks, Greg

        I Offline
        I Offline
        Ilushka
        wrote on last edited by
        #3

        Do exactly as you`ve been told, and mind that the SB_PAGEDOWN could be used too. Sincerely yours, Ilya Kalujny.

        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