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. Questions about CRichEditCtrl

Questions about CRichEditCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questionhardware
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.
  • S Offline
    S Offline
    squizz
    wrote on last edited by
    #1

    Hi ! I'm developping a small SDI app with a CRicheditCtrlView. a few questions : 1. How can I know that the embedded CRichEditCtrl is scrolling ? I can handle clicks on scroll bars with VK_VSCROLL, handle page up /page down keys .... Is there a way to detect scrolling without coding a method for each message ? 2. How can I calculate the number of text lines being deisplayed ? Is there an equivalent for GetFirstVisibleLine() to find the last visible line ? If not, does someone know a method to achieve this ? Thx

    B 1 Reply Last reply
    0
    • S squizz

      Hi ! I'm developping a small SDI app with a CRicheditCtrlView. a few questions : 1. How can I know that the embedded CRichEditCtrl is scrolling ? I can handle clicks on scroll bars with VK_VSCROLL, handle page up /page down keys .... Is there a way to detect scrolling without coding a method for each message ? 2. How can I calculate the number of text lines being deisplayed ? Is there an equivalent for GetFirstVisibleLine() to find the last visible line ? If not, does someone know a method to achieve this ? Thx

      B Offline
      B Offline
      Bill Wilson
      wrote on last edited by
      #2

      "1. I can handle clicks on scroll bars with VK_VSCROLL, handle page up /page down keys .... Is there a way to detect scrolling without coding a method for each message ?" Override OnHScroll and OnVScroll, these methods are called whenever horizontal or vertical scrolling happens. "2. How can I calculate the number of text lines being deisplayed ? Is there an equivalent for GetFirstVisibleLine() to find the last visible line ? If not, does someone know a method to achieve this ?" I think you have to use GetFirstVisibleLine and then start adding line heights until you get to the window size and declare that your "last visisble line" Hope this helps, Bill

      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