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.
goody11
-2
Junior Poster
Recommended Answers
Jump to PostAppend 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); ....
Jump to PostAre you using MFC or win32 api functions? When you created the edit box you got a HANDLE to the object. See this article
All 7 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
goody11
-2
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
goody11
-2
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
goody11
-2
Junior Poster
goody11
-2
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.