deivakumar
January 16th, 2007, 04:42 AM
I am trying to use a RichEdit control in my code. I am able to bring up the window with the RichEdit control. I would like to populate the RichEdit dialog with some text using SendDlgItemMessage() but keep getting the error as follows:
D:\Test\Test.cpp(198) : error C2065: 'SETTEXTEX' : undeclared identifier
D:\Test\Test.cpp(198) : error C2146: syntax error : missing ';' before identifier 'setTextEx'
D:\Test\Test.cpp(198) : error C2065: 'setTextEx' : undeclared identifier
D:\Test\Test.cpp(199) : error C2228: left of '.codepage' must have class/struct/union type
D:\Test\Test.cpp(200) : error C2228: left of '.flags' must have class/struct/union type
D:\Test\Test.cpp(200) : error C2065: 'ST_DEFAULT' : undeclared identifier
D:\Test\Test.cpp(201) : error C2065: 'EM_SETTEXTEX' : undeclared identifier
I understand that I can get the text to be displayed on the RichEdit control by using Edit_SetText() but the thing that I would like to do is to be able to display special characters like the "TM" (trademark) and copyright (the circle with the 'c' in it). I found that if I use Edit_SetText(), I only see a '|" in the place of the special character in the RichEdit control. After reading in many sources, I found that I have to use SendDlgItemMessage(), which in turn needs SETTEXTEX.
When I looked at the richedit.h file, I found that SETTEXTEX was not in the header file.
I am attaching my project as a zip file. The RichEdit control can be found in the About dialog box, by clicking on the About menu item.
Could anyone help me please. If it is not too much to ask, it would be appreciated if you could edit my codes and send it to me (Sorry, I dun mean to be too demanding in any way but I am new to all of this. So any help would be most appreciated).
p.s. I am using MS Visual C++ 6.0. And I do not want to use MFC.
D:\Test\Test.cpp(198) : error C2065: 'SETTEXTEX' : undeclared identifier
D:\Test\Test.cpp(198) : error C2146: syntax error : missing ';' before identifier 'setTextEx'
D:\Test\Test.cpp(198) : error C2065: 'setTextEx' : undeclared identifier
D:\Test\Test.cpp(199) : error C2228: left of '.codepage' must have class/struct/union type
D:\Test\Test.cpp(200) : error C2228: left of '.flags' must have class/struct/union type
D:\Test\Test.cpp(200) : error C2065: 'ST_DEFAULT' : undeclared identifier
D:\Test\Test.cpp(201) : error C2065: 'EM_SETTEXTEX' : undeclared identifier
I understand that I can get the text to be displayed on the RichEdit control by using Edit_SetText() but the thing that I would like to do is to be able to display special characters like the "TM" (trademark) and copyright (the circle with the 'c' in it). I found that if I use Edit_SetText(), I only see a '|" in the place of the special character in the RichEdit control. After reading in many sources, I found that I have to use SendDlgItemMessage(), which in turn needs SETTEXTEX.
When I looked at the richedit.h file, I found that SETTEXTEX was not in the header file.
I am attaching my project as a zip file. The RichEdit control can be found in the About dialog box, by clicking on the About menu item.
Could anyone help me please. If it is not too much to ask, it would be appreciated if you could edit my codes and send it to me (Sorry, I dun mean to be too demanding in any way but I am new to all of this. So any help would be most appreciated).
p.s. I am using MS Visual C++ 6.0. And I do not want to use MFC.