0

我正在尝试创建一个简单的程序,如果你甚至可以这样称呼它。

它有一个主对话框和一个编辑框/控件内部。图片

当我尝试调试时(我使用的是 MS Visual Studio 2013),我得到了“I-beam”(闪烁的文本指针),但我无法输入任何文本。图片

问题:为什么?怎么修?

另外,稍后我想尝试将输入的文本写入 txt 文件。我试过搜索它,发现你必须使用字符串方法......除此之外我无法理解解释;(

代码:

void Cedit2textDlg::OnEnChangeEdit1()
{
// TODO:  If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialogEx::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO:  Add your control notification handler code here
}

程序称为edit2text。这是关于我在主 edit2textDlg.cpp 文件中的编辑框的唯一部分。您可以在第一张图片中看到 .rc。

我发现了一个使用dlg.DoModal();解决的类似问题。并为带有 value-category 的编辑框创建一个变量,但不明白我应该如何以及为什么要使用它。

4

0 回答 0