Solved

CRichEditCtrl cannot has the alphabet become uppercase

Posted on 2001-08-25
9
246 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:orange_juice
  • 3
  • 3
  • 3
9 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 50 total points
Comment Utility
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
 
LVL 1

Author Comment

by:orange_juice
Comment Utility
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
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
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
 
LVL 4

Expert Comment

by:jtwine100697
Comment Utility
Is this the same problem that I already answered for you?

-=- James.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
hi orange_juice,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
LVL 4

Expert Comment

by:jtwine100697
Comment Utility
(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
 
LVL 1

Author Comment

by:orange_juice
Comment Utility
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
 
LVL 1

Author Comment

by:orange_juice
Comment Utility
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
 
LVL 4

Expert Comment

by:jtwine100697
Comment Utility
> 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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Named range not carried over 10 57
dog bark java program 15 81
Doc'in system (example?) BA 7 78
Making an alias 7 51
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now