用MFC编了个小程序,就是把编辑框输入的内容插入到已有的对象中,但是当关闭后再输出时却没有了,该怎么办
程序如下:voidCSHURUDlg::OnButton2(){CStringshuru;GetDlgItemText(IDC_EDIT3,shuru);CStringc...
程序如下:
void CSHURUDlg::OnButton2()
{
CString shuru;
GetDlgItemText(IDC_EDIT3,shuru);
CString charu;
CString wenjian="略············";
GetDlgItemText(IDC_EDIT2,charu);
wenjian.Insert(wenjian.GetLength(),charu);
SetDlgItemText(IDC_EDIT1,wenjian);
}
关闭程序再打开时就没了 展开
void CSHURUDlg::OnButton2()
{
CString shuru;
GetDlgItemText(IDC_EDIT3,shuru);
CString charu;
CString wenjian="略············";
GetDlgItemText(IDC_EDIT2,charu);
wenjian.Insert(wenjian.GetLength(),charu);
SetDlgItemText(IDC_EDIT1,wenjian);
}
关闭程序再打开时就没了 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询