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. CStatic scroll bar

CStatic scroll bar

Scheduled Pinned Locked Moved C / C++ / MFC
questionwpfdata-structureshelp
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.
  • D Offline
    D Offline
    Dean Goodman
    wrote on last edited by
    #1

    Is it possible to add a scroll bar to a CStatic control? I've derived a new base class from CStatic for graph/chart purposes, and I'd like to be able to allow the graph to scroll if it is too big for the available viewing area. I've found many graphing projects on the net, but none seem to have this feature which is of particular importance to me since I have long series of data. I've tried adding the WS_HSCROLL and WS_VSCROLL styles, I've called EnableScrollBarCtrl(), and I've called ShowScrollBar() but none of these methods have any effect. Anyone know something I don't? A second question: I've also added the SS_NOTIFY style, but my (base) class isn't receiving the notification. Do I have to override the message notification in every other class I derive from the base class to process the notification? Thanks for the help, --Dean

    PJ ArendsP 1 Reply Last reply
    0
    • D Dean Goodman

      Is it possible to add a scroll bar to a CStatic control? I've derived a new base class from CStatic for graph/chart purposes, and I'd like to be able to allow the graph to scroll if it is too big for the available viewing area. I've found many graphing projects on the net, but none seem to have this feature which is of particular importance to me since I have long series of data. I've tried adding the WS_HSCROLL and WS_VSCROLL styles, I've called EnableScrollBarCtrl(), and I've called ShowScrollBar() but none of these methods have any effect. Anyone know something I don't? A second question: I've also added the SS_NOTIFY style, but my (base) class isn't receiving the notification. Do I have to override the message notification in every other class I derive from the base class to process the notification? Thanks for the help, --Dean

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

      FWIW, I would have derived the control from CWnd, not CStatic. CStatic has too many restrictions such as the ones you described.


      CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      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