Link to home
Start Free TrialLog in
Avatar of Moin
Moin

asked on

Entering text in text box

Hi, I want to enter text, in a text box placed on a dialog, in 2 different ways. I have place buttons on the dialog, like windows phone dialer. I want that if I enter values thru buttons, it should enter the text at the positin where the cursor is blinking. Manual entry is OK in text box but when I press buttons, that's the problem.
Waiting for help...
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Moin
Moin

ASKER

How will I use it, I have placed a control on the dialog box from toolbox.
Use ClassWizard to add a member variable (m_edit) of type CEdit to associate the edit control.

In your button handler,

m_edit.SetSel(-1, 0);
m_edit.ReplaceSel(_T("insert"));