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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem in dialog box scrolling [modified]

Problem in dialog box scrolling [modified]

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

    Hi, I have a dialog box which has vertical scroll style enabled. The problem is, when i pull the scroll button down the controls in the dialog box move down. But when i pull the scroll button up the controls does not move up. The code which i have used is listed below void CMyPropertyDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) { // TODO: Add your message handler code here and/or call default CDialog::OnVScroll(nSBCode, nPos, pScrollBar); SetScrollPos( SB_VERT , nPos , TRUE ) ; ScrollWindow( 0 , GetScrollPos( SB_VERT ) ) ; } please help -- modified at 0:03 Friday 23rd February, 2007

    M 1 Reply Last reply
    0
    • C C Mahesh

      Hi, I have a dialog box which has vertical scroll style enabled. The problem is, when i pull the scroll button down the controls in the dialog box move down. But when i pull the scroll button up the controls does not move up. The code which i have used is listed below void CMyPropertyDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar) { // TODO: Add your message handler code here and/or call default CDialog::OnVScroll(nSBCode, nPos, pScrollBar); SetScrollPos( SB_VERT , nPos , TRUE ) ; ScrollWindow( 0 , GetScrollPos( SB_VERT ) ) ; } please help -- modified at 0:03 Friday 23rd February, 2007

      M Offline
      M Offline
      MuraliKrishnaP
      wrote on last edited by
      #2

      The second parameter for ScrollWindow, yAmount must be a negative value to scroll up. My idea is to take a member var which stores the previous pos, compare to see the direction and write code accordingly. HTH, Murali Krishna

      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