CString strPath,strText="";
if(dlg.DoModal()==IDOK)
{
strPath=dlg.GetPathName();
m_OpenPath.SetWindowText(strPath);
CFile file(strPath,CFile::modeRead);
char read[10000];
file.Read(read,10000);
for(int i=0;i<file.GetLength();i++)
{
strText+=read[i];
}
file.Close();
m_FileText.SetWindowText(strText);
}
c++使用对话框打开文件,代码中m_OpenPath是什么?是对象吗?后面怎么可以用.运算符?
粗体部分编译出现错误
1.'m_OpenPath' : undeclared identifier
2.left of '.SetWindowTextA' must have class/struct/union type

m_OpenPath是什么?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-