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. CRichEditCtrl Flickring

CRichEditCtrl Flickring

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 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.
  • J Offline
    J Offline
    john5632
    wrote on last edited by
    #1

    Hi, I am using CRichEditCtrl. I need to add percentage in a loop at end of text. Every time I need to call GetWindowText() and append text and again SetWindowText(), but due to this I am getting flickring. How can I add only a single line og text in CRichEditCtrl so that I can avoid flickring.

    M S C 3 Replies Last reply
    0
    • J john5632

      Hi, I am using CRichEditCtrl. I need to add percentage in a loop at end of text. Every time I need to call GetWindowText() and append text and again SetWindowText(), but due to this I am getting flickring. How can I add only a single line og text in CRichEditCtrl so that I can avoid flickring.

      M Offline
      M Offline
      Madhu Nair 0
      wrote on last edited by
      #2

      How about adding a CString member variable[^] for your CRichEditCtrl and updating the data using UpdateData[^]

      1 Reply Last reply
      0
      • J john5632

        Hi, I am using CRichEditCtrl. I need to add percentage in a loop at end of text. Every time I need to call GetWindowText() and append text and again SetWindowText(), but due to this I am getting flickring. How can I add only a single line og text in CRichEditCtrl so that I can avoid flickring.

        S Offline
        S Offline
        Software_Developer
        wrote on last edited by
        #3

        Do a flicker-free drawing using MFC methods Do a flicker-free drawing using MFC methods[^] Flicker Free Drawing In MFC Flicker Free Drawing In MFC[^] Flicker free drawing using memory DC http://www.codeguru.com/cpp/misc/misc/flickerfreedrawing/article.php/c389[^]

        1 Reply Last reply
        0
        • J john5632

          Hi, I am using CRichEditCtrl. I need to add percentage in a loop at end of text. Every time I need to call GetWindowText() and append text and again SetWindowText(), but due to this I am getting flickring. How can I add only a single line og text in CRichEditCtrl so that I can avoid flickring.

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          Don't know how much it would flicker, but try using CRichEditCtrl::SetSel[^] and CRichEditCtrl::ReplaceSel[^] to change only the part of the text you want. You might try combining it with CWnd::SetRedraw[^] and CWnd::RedrawWindow[^] to have it redraw itself only once after the text has been changed.

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

          J 1 Reply Last reply
          0
          • C Code o mat

            Don't know how much it would flicker, but try using CRichEditCtrl::SetSel[^] and CRichEditCtrl::ReplaceSel[^] to change only the part of the text you want. You might try combining it with CWnd::SetRedraw[^] and CWnd::RedrawWindow[^] to have it redraw itself only once after the text has been changed.

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

            J Offline
            J Offline
            john5632
            wrote on last edited by
            #5

            Thanks

            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