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. Scrollbars - How to get a certain style

Scrollbars - How to get a certain style

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
2 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.
  • R Offline
    R Offline
    Roger Allen
    wrote on last edited by
    #1

    I am trying to get a dynamically created scrollbar to have a thumb which is proportional to how much area is currently displayed. You can see this kind of style on the IE explorer vertical scroll bar when you need to scroll a page, the thumb shows how much of the total page you have displayed. For my scroll bar, its the default block size, and I can't seem to change it to what I want. I have been through most of the MSDN on the subject. Is there some command or style I have missed that will do this for me? Roger Allen Sonork 100.10016 If I had a quote, it would be a very good one.

    S 1 Reply Last reply
    0
    • R Roger Allen

      I am trying to get a dynamically created scrollbar to have a thumb which is proportional to how much area is currently displayed. You can see this kind of style on the IE explorer vertical scroll bar when you need to scroll a page, the thumb shows how much of the total page you have displayed. For my scroll bar, its the default block size, and I can't seem to change it to what I want. I have been through most of the MSDN on the subject. Is there some command or style I have missed that will do this for me? Roger Allen Sonork 100.10016 If I had a quote, it would be a very good one.

      S Offline
      S Offline
      Stephen C Steel
      wrote on last edited by
      #2

      Have a look at the MSDN documentation for the MFC CWnd member function CWnd::SetScrollInfo () (or the plain SDK function SetScrollInfo () which it invokes). SCROLLINFO scroll_info; scroll_info.cbSize = sizeof (scroll_info); scroll_info.fMask = SIF_PAGE | SIF_POS | SIF_RANGE; scroll_info.nMin = min; scroll_info.nMax = min; scroll_info.nPos = position; scroll_info.nPage = size_of_window; SetScrollInfo (SB_VERT, &scroll_info); Stephen C. Steel Kerr Vayne Systems Ltd.

      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