I'm triying to show a CString in RichEditControl with SetWindowsText, but when the dialog appear only show the container in white, but not show the text. What happen?
I'm sorry, I'm so silly, but I've looked all day and I didn't find the function to show the text in richEdit control 2.0. Please, Could you give the name or the web?
I'm learning to program in visual c++
I'm sorry, I'm so silly, but I've looked all day and I didn't find the function to show the text in richEdit control 2.0. Please, Could you give the name or the web?
I'm learning to program in visual c++
"Learning to program in visual c++" is much harder then learning how to use a web search engine (just like google like Skizmo proposed).
Why should we google that for you? In Post #2 Skizmo provided you the right idea and suggested to google for the details. Please be so kind and google that by your own. It seems to me that you don't want to "learn to program in visual c++" : What you want to do is : Getting finished working code from CodeGuru ...
I'm sorry but if I posted here were becouse I looked in google and I didnt understood and I didnt find the function.
I just looked for someone that he can say to me the name or something like that. But dont worry, I look for more or I will ask another person.
Thank you.
Tell us what you've done so far (e.g. "I found the following link ...")
Describe as exact as possible where you have problems (e.g. "I tried this or this and I got the following error message ..:", or "I didn't understand ...")
That way you used there is only a small chance to get help. Skizmo gave you the right keyword for a search and you asked again for the name of the function to set the text in a rich edit control
Using google and skizmo's hint I got the following hint:
@GCDEF: Maybe I've been a little bit too harsh here.
General answer to the use of rich edit controls:
MSDN states:
Because rich edit controls support almost all of the messages and notification codes used with multiline Edit Controls, applications that already use edit controls can easily be changed to use rich edit controls.
meaning that the WM_SETWINDOWTEXT message shoud work.
I tried the following:
In my Win32 MFC application I added a rich edit control to a test dialog, giving it a resource id and a member variable of type CRichEditCtrl. The result was that the dialog has not been created succesfully.
After adding a call to AfxInitRichEdit before calling DoModal of the dialog all things worked fine.
Please note that the multi line style shoud be enabled to get a proper working rich edit control.
The reason for beeing just a little bit harsh to the OP was that he didn't refer to Skizmo's suggestions at all (but he did so after my harsh post).
Thank you everypeople.
@ProgramArtis I know I must call to AfxInitRichEdit2 before to call DoModal, it is not the problem.
The problem is that when I call the dialog the container is in white, but maybe it is due to I call SetWindowsText instead of another function own of richedit control
I'm going to investigate about everypeople said to me and I'm going to visit every web, and if I still have any question, I try to do the question more concise.
Thank you
EDIT: Finally I resolved my problem change richedit by edit. Thank you
Last edited by a343; August 31st, 2011 at 03:45 AM.
Bookmarks