在编辑框中设置文本(无按钮单击事件) [英] Set Text in Edit Box (Without Button click event)

查看:83
本文介绍了在编辑框中设置文本(无按钮单击事件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除按钮点击事件外是否有任何选项,以便我可以在编辑框中设置文本。

Is there any option other than on button click event, so that I can set text in Edit Box.

推荐答案

您可以在任何功能中设置文本想要,但你必须区分纯SetWindowText和连接变量的成员值。这里有一些示例



重要的是你的电话是在主线程中。如果没有将PostThreadMessage与处理程序一起使用。
You can set the text in any function you want, but you must distinguish between the pure SetWindowText and member value of an "connected" variable. Here is some example.

Important is that your calls are in the main-thread. If not use a PostThreadMessage with a handler.


您应该在 OnInitDialog 方法中设置编辑框文本。请参阅MSDN:初始化对话框 [ ^ ]。
You should set the edit box text in the OnInitDialog method. See MSDN: "Initializing the Dialog Box"[^].


这篇关于在编辑框中设置文本(无按钮单击事件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆