从用户那里获取文本输入并等待它发生

问题描述:

大家好,



我正在做一个基于MFC对话框的项目,其中我需要带文本输入用户,

搜索后在网上我发现这篇文章 VB Like InputBox for MFC [ ^ ]并使用CInputBox类。

现在问题是我想要的在用户输入文本之前等待并在应用程序中不执行任何操作,然后使用用户输入的字符串。(现在其他线程将在用户忙于输入数据的情况下运行)

如何我可以这样做。

请帮助,

提前谢谢。

Hi all,

I am doing an MFC Dialog based project in which i need to take text input user,
after searching on net I found this article VB Like InputBox for MFC[^] and using CInputBox class.
Now the problem is I want to wait and do nothing in application till the user has entered the text,then use the string the user has entered.(Now the other threads will be running though the user is busy entering the data)
How can I do it this way.
Please help,
Thanks in advance.

你有几个选项:

1.您可以在输入文本时捕获文本。然后,当输入的文本达到一定大小或按下某个字符(即Enter)时,您会回复。

请参阅这篇文章 [ ^ ]。



2.你可以添加一个文本框旁边的按钮,用户在输入完成时按下该按钮。
You have several options:
1. You can capture the text when it is entered, character after character. Then when the entered text reaches a certain size, or a certain character is pressed (i.e. "Enter"), you respond.
See this article[^].

2. You can add a button next to the text box, which is pressed by the user when the input is completed.