rich edit question
-
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! -
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!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)
-
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!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;
-
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)
-
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;
-
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
-
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!kfaday wrote: how do i write to the rich edit? Use
SetWindowText()
, orReplaceSel()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen