CRichEditCtrl cannot has the alphabet become uppercase

i put a richeditctrl in dialog on resource editor.
i set the UPPERCASE style for the richedit control under its property dialog.
   however, what i input the in the rich edit control didn't turn out to be automatically converted to uppercase
what is wrong?
LVL 1
orange_juiceAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
DanRollinsConnect With a Mentor Commented:
I assume that your ptoblem is that when you set the window text, it remains lowercase or mixed case.

The UPPERCASE flag only works to convert text that gets typed by the user.

So, simply do something like:

   m_sText.MakeUpper();

before the text gets placed into the control.

-- Dan
0
 
orange_juiceAuthor Commented:
Yes, i agree with your point : )
luckilly, i just want to convert text gets typed by user...
but, how to get those text prior to be placed into control?
i mean, how to get m_sText

thank you
0
 
DanRollinsCommented:
You cam place text into a CRichEditCtrl by using SetWindowText() or by using the ClassWizard to create a CString type variable for the control (name it m_sText).  Then when you open the dialog box use code like:

CMyDlg dlg;
dlg.m_sText="Here is some text for the Rich Edit!";
dlg.DoModal()

There are other ways to get text into the control, these are the easy ways.

-- Dan
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
jtwine100697Commented:
Is this the same problem that I already answered for you?

-=- James.
0
 
DanRollinsCommented:
hi orange_juice,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
jtwine100697Commented:
(I am not sure what the OP is trying to do with this pseudo-duplicate question.)

The problem is that the Rich Edit controls ignore the ES_UPPERCASE and ES_LOWERCASE styles...  However, Rich Edit 3.0 supports the EM_SETEDITSTYLE message, which can be used to obtain similar functionality.

-=- James.
0
 
orange_juiceAuthor Commented:
oops, owing to the weird refresh problem of experts-exchange, i accidentally thought that my first q can't get through, so i duplicate one
sorry for the confusion....
0
 
orange_juiceAuthor Commented:
oops, i overlooked something
  actually, i mean when i type into the richedit control, and not try to set-text into it.
  anyway, this is a new knowledge to me :)

James:
  yes, it is the duplicate answer

Dan,
  thanks
0
 
jtwine100697Commented:
> actually, i mean when i type into the richedit control,

Then you already know why the styles do not work as expected, and a possible solution, from the information I gave you on your original posted question.

-=- James.
0
All Courses

From novice to tech pro — start learning today.