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. Rich Editor

Rich Editor

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
6 Posts 3 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.
  • T Offline
    T Offline
    tctan
    wrote on last edited by
    #1

    I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?

    K D 2 Replies Last reply
    0
    • T tctan

      I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      Do the processing in a separate thread. That will keep the dialog "alive" during the processing.

      T 1 Reply Last reply
      0
      • K kakan

        Do the processing in a separate thread. That will keep the dialog "alive" during the processing.

        T Offline
        T Offline
        tctan
        wrote on last edited by
        #3

        Is there a simple way besides having a thread?

        K 1 Reply Last reply
        0
        • T tctan

          I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?

          D Offline
          D Offline
          Dan McCormick
          wrote on last edited by
          #4

          after you write the "please wait" message, try calling RedrawWindow() on the rich edit object to force an immediate repaint. Then continue with the processing. If pRichEdit is a pointer to your rich edit object, then you would call pRichEdit->RedrawWindow(). Regards, Dan Remember kids, we're trained professionals.
          Don't try this at home!

          T 1 Reply Last reply
          0
          • D Dan McCormick

            after you write the "please wait" message, try calling RedrawWindow() on the rich edit object to force an immediate repaint. Then continue with the processing. If pRichEdit is a pointer to your rich edit object, then you would call pRichEdit->RedrawWindow(). Regards, Dan Remember kids, we're trained professionals.
            Don't try this at home!

            T Offline
            T Offline
            tctan
            wrote on last edited by
            #5

            It doesn't work.

            1 Reply Last reply
            0
            • T tctan

              Is there a simple way besides having a thread?

              K Offline
              K Offline
              kakan
              wrote on last edited by
              #6

              Sorry for the late answer. Yes, you can have your own message pump function and make sure you call it every once in a while during the lenghty processing. -- modified at 6:00 Friday 12th May, 2006

              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