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. CScrollView Help

CScrollView Help

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 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.
  • V Offline
    V Offline
    VanHlebar
    wrote on last edited by
    #1

    I am writing this application for a pocketpc, but I would assume that the basics of the CScrollView class would not differ to much. Here is what I would like to be able to do: Is it possible to set the size of the view port smaller than the size of the screen and still have a portion of the screen scroll when text rolls off the screen? What I need is I have some title printed at the top of a View that need to stay static. When text goes beyond the bottom of the screen I want the vertical scroll bars to appear so the user can scroll up and down to view the data, but still have the title's remain visible. Sort of like a frozen row in Excel. Currently the only work around that I have found is to repaint the entire screen on each up/down click no the scroll bar. This results in screen flicker and is extremley inefficient. Also, using this method does not allow the user to click and drag the scroll bar to a position as the application attempts to redraw the entire screen with each increment. Thanks, -Eric

    R 1 Reply Last reply
    0
    • V VanHlebar

      I am writing this application for a pocketpc, but I would assume that the basics of the CScrollView class would not differ to much. Here is what I would like to be able to do: Is it possible to set the size of the view port smaller than the size of the screen and still have a portion of the screen scroll when text rolls off the screen? What I need is I have some title printed at the top of a View that need to stay static. When text goes beyond the bottom of the screen I want the vertical scroll bars to appear so the user can scroll up and down to view the data, but still have the title's remain visible. Sort of like a frozen row in Excel. Currently the only work around that I have found is to repaint the entire screen on each up/down click no the scroll bar. This results in screen flicker and is extremley inefficient. Also, using this method does not allow the user to click and drag the scroll bar to a position as the application attempts to redraw the entire screen with each increment. Thanks, -Eric

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      Adjust the size of the non-client area of the window (in OnNcCreate()) and paint the title in the non-client area.

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      V 1 Reply Last reply
      0
      • R Ryan Binns

        Adjust the size of the non-client area of the window (in OnNcCreate()) and paint the title in the non-client area.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        V Offline
        V Offline
        VanHlebar
        wrote on last edited by
        #3

        Ryan, Thanks for the help. I don't see an OnNcCreate() in the ppc framework. I thought it would be part of the CWd class but I don't see it defined. I tried altering the CREATESTRUCT in the PreCreateWindow and setting the cy attribute to 300 since the screen is 240 x 320. This I was hoping would give me 20 pixels to work with at the top of the screen. When you say adjust the non-client area are these actual members of the CWD class? Thanks again for the help, -Eric

        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