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 edit question

rich edit question

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

    well, i'm ashamed to ask this... i have a rich edit, i have initialized it properly, i've got the control and value variables here: CRichEditCtrl m_REditDebug; CString m_REditDebugVal; how do i write to the rich edit? m_REditDebug.insertstring or something?? i really couldn't find it!! thanks for your help!

    T Z D 3 Replies Last reply
    0
    • K kfaday

      well, i'm ashamed to ask this... i have a rich edit, i have initialized it properly, i've got the control and value variables here: CRichEditCtrl m_REditDebug; CString m_REditDebugVal; how do i write to the rich edit? m_REditDebug.insertstring or something?? i really couldn't find it!! thanks for your help!

      T Offline
      T Offline
      TrungHuynh
      wrote on last edited by
      #2

      First you must init AfxInitRichEdit() in .h file you declare CString m_strRichEdit; with cpp file in DoDataExchange(CDataExchange* pDX) function DDX_Text(pDX, IDC_RECONTROL, m_strRichEdit); then you just do like that: m_strRichEdit = _T("Try"); UpdateData(FALSE); these steps you can do by wizard. CRichEditCtrl also has another function StreamIn: to load data from file to rich edit(MSDN)

      K 1 Reply Last reply
      0
      • K kfaday

        well, i'm ashamed to ask this... i have a rich edit, i have initialized it properly, i've got the control and value variables here: CRichEditCtrl m_REditDebug; CString m_REditDebugVal; how do i write to the rich edit? m_REditDebug.insertstring or something?? i really couldn't find it!! thanks for your help!

        Z Offline
        Z Offline
        Zeeshan Bilal
        wrote on last edited by
        #3

        USE the ::: UpdateData(TRUE) for CString m_REditDebugVal; after asigning it a value like m_REditDebugVal = " hi how r u ? "; UpdateData(TRUE); hoping it will work;

        K 1 Reply Last reply
        0
        • T TrungHuynh

          First you must init AfxInitRichEdit() in .h file you declare CString m_strRichEdit; with cpp file in DoDataExchange(CDataExchange* pDX) function DDX_Text(pDX, IDC_RECONTROL, m_strRichEdit); then you just do like that: m_strRichEdit = _T("Try"); UpdateData(FALSE); these steps you can do by wizard. CRichEditCtrl also has another function StreamIn: to load data from file to rich edit(MSDN)

          K Offline
          K Offline
          kfaday
          wrote on last edited by
          #4

          i've done all the steps, i've got this function: void CVentanaDebug::EscribirRichEdit(CString temp) { m_REditDebugVal = _T(temp); UpdateData(FALSE); } and when i call it, i get an Debug Assertion Failed! error any ideas? thanks!

          1 Reply Last reply
          0
          • Z Zeeshan Bilal

            USE the ::: UpdateData(TRUE) for CString m_REditDebugVal; after asigning it a value like m_REditDebugVal = " hi how r u ? "; UpdateData(TRUE); hoping it will work;

            K Offline
            K Offline
            kfaday
            wrote on last edited by
            #5

            this doesn't work either... sorry

            T 1 Reply Last reply
            0
            • K kfaday

              this doesn't work either... sorry

              T Offline
              T Offline
              TrungHuynh
              wrote on last edited by
              #6

              ok. I have a small app, that i have tested with DHTML control, and RichEdit. you give me your email address i will send it for you bye

              1 Reply Last reply
              0
              • K kfaday

                well, i'm ashamed to ask this... i have a rich edit, i have initialized it properly, i've got the control and value variables here: CRichEditCtrl m_REditDebug; CString m_REditDebugVal; how do i write to the rich edit? m_REditDebug.insertstring or something?? i really couldn't find it!! thanks for your help!

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                kfaday wrote: how do i write to the rich edit? Use SetWindowText(), or ReplaceSel().


                "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

                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