Reputation: 199
I have a dialog, it has 4 CEdit controls and 9 CButton(number 0 ~ 9), I want press the number button, then the input focus in CEdit control don't move and input the number into the CEdit controls, any advice?
Upvotes: 0
Views: 231
Reputation: 3636
You can react on the KillFocus-event of the edit control and store which edit was active. In the click-event of the button you set the focus back to the control and append the pressed number to the edit text.
Upvotes: 1