rich edit
-
hi all if you want to hear my problem briefly it's that i have created a rich edit box in my dialog and now i cant put text in it properly is there a function or i should do it by first taking its DC(device context) . lots of thanks you kind professional :rose::-O
-
hi all if you want to hear my problem briefly it's that i have created a rich edit box in my dialog and now i cant put text in it properly is there a function or i should do it by first taking its DC(device context) . lots of thanks you kind professional :rose::-O
-
hi all if you want to hear my problem briefly it's that i have created a rich edit box in my dialog and now i cant put text in it properly is there a function or i should do it by first taking its DC(device context) . lots of thanks you kind professional :rose::-O
ramtinbahal wrote: i have created a rich edit box in my dialog and now i cant put text in it properly is there a function Create a
CRichEditCtrl
member variable and then useSetWindowText()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
ramtinbahal wrote: i have created a rich edit box in my dialog and now i cant put text in it properly is there a function Create a
CRichEditCtrl
member variable and then useSetWindowText()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
thanks for your simple response but now i'm trying to put text in a rich edit control while accessing the way i put it there . i mean how i can put text at a line number and a column i wish (example line 5 column 20 ) ? setwindowtext() is good for one line rich edit but i have a multiline rich edit box .so i need a way to write text in it how i wish . Strangely there is no function in rich edit class to do it (except SetWindowText() ) or maybe i dont know because i searched MSDN entirely but nothing found . lots of thanks
-
thanks for your simple response but now i'm trying to put text in a rich edit control while accessing the way i put it there . i mean how i can put text at a line number and a column i wish (example line 5 column 20 ) ? setwindowtext() is good for one line rich edit but i have a multiline rich edit box .so i need a way to write text in it how i wish . Strangely there is no function in rich edit class to do it (except SetWindowText() ) or maybe i dont know because i searched MSDN entirely but nothing found . lots of thanks
SetWindowText()
can be used, but you'll either need to callGetWindowText()
, or have the text stored in a separate buffer. For example:CString strBuffer1;
...
strBuffer1 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer1);The other way would look like:
CString strBuffer2;
m_edit.GetWindowText(strBuffer1);
strBuffer2 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer2);You can also use
ReplaceSel()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
SetWindowText()
can be used, but you'll either need to callGetWindowText()
, or have the text stored in a separate buffer. For example:CString strBuffer1;
...
strBuffer1 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer1);The other way would look like:
CString strBuffer2;
m_edit.GetWindowText(strBuffer1);
strBuffer2 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer2);You can also use
ReplaceSel()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
realy thank you david it did work . i was going to be realy disappoited with microsoft . but you saved them ;) good luck
-
SetWindowText()
can be used, but you'll either need to callGetWindowText()
, or have the text stored in a separate buffer. For example:CString strBuffer1;
...
strBuffer1 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer1);The other way would look like:
CString strBuffer2;
m_edit.GetWindowText(strBuffer1);
strBuffer2 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer2);You can also use
ReplaceSel()
.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
realy thank you david it did work . i was going to be realy disappoited with microsoft . but you saved them ;) good luck