Re: How to change ALL comma in a CEdit into double byte comma?
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 12 Jun 2008 17:36:51 -0400
Well, that's pretty easy:
CString s;
c_MyEditControl.GetWindowText(s);
if(s.Replace(_T(","), _T(" ")))
c_MyEditControl.SetWindowText(s);
I'd put this in the EN_CHANGE handler.
joe
On Wed, 11 Jun 2008 16:43:00 -0700, Landon <Landon@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Joseph M. Newcomer [MVP]I would make sure the program is compiled to use Unicode.
Then modify the strings to contain the characters you need before adding
them to the edit controls (before call to SetWindowText())
If you need to modify it while the user is typing then you could create an
OnChar() handler to check each character as it is typed and replace it with
whatever you'd like. If you need to turn one character into two you could
just call CEdit::OnChar(...) twice from your OnChar routine (the one in the
base class).
http://support.microsoft.com/kb/92394
Tom
No, the problem is that I don't check the user input. It just to check if
the user press the comma key or there is old data which has comma and needs
to be updated, so I must check a CEdit string and change all the commas to
Kanji comma which is double bytes.
How ?
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Re: How to change ALL comma in a CEdit into double byte comma?
- From: Tom Serface
- Re: How to change ALL comma in a CEdit into double byte comma?
- Prev by Date: Re: Where to start render loop?
- Next by Date: Re: How to change ALL comma in a CEdit into double byte comma?
- Previous by thread: Re: How to change ALL comma in a CEdit into double byte comma?
- Next by thread: Re: How to change ALL comma in a CEdit into double byte comma?
- Index(es):
Relevant Pages
|