0

Hey, I'm working on a Spanish program and I want to make it so that if somebody wants to type in an a with an accent all they have to do is press the pushbutton. I realize how to create the pushbutton but I don't know how to just insert the character into an edit box at the end of whatever they were typing. How could I go about doing this? Code examples would be much appreciated.

3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by goody11
0

Append text to an edit control.

CEdit edit;
LPCTSTR pszText;
.....
.....

int nLength = edit.GetWindowTextLength();
// put the selection at the end of text
edit.SetSel(nLength, nLength);
// replace the selection
edit.ReplaceSel(pszText);
....
0

Well, I create the edit box in my resource file and it's identifier is something like IDC_IDENTIFIER. So how would I go about doing it that way?

0

Yea I was actually looking at that just before you told me that but is there some kind of message for inserting the text?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.