Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个对话框,它有4个CEdit控件和9个CButton(数字0~9),我想按下数字按钮,然后CEdit控件中的输入焦点不要移动,在CEdit控件中输入数字,有什么建议吗? </p>
您可以对编辑控件的 KillFocus 事件做出反应并存储哪个编辑处于活动状态。在按钮的单击事件中,您将焦点设置回控件并将按下的数字附加到编辑文本中。