主题:为什么CString 在内函的代码中不能赋值给CView的CString
netName是返回的打开文件的地址
void CDocManager::OnFileOpen() [color=FF0000]这是内函的函数来的[/color]
{
// prompt the user (with all document templates)
CString newName;
if (!DoPromptFileName(newName&&m_strMane, AFX_IDS_OPENFILE,
OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, NULL))
return; // open cancelled
AfxGetApp()->OpenDocumentFile(newName);
// if returns NULL, the user has already been alerted
}
如何取到newname的值到CView那里呢?都试过很多方法,也不行~!这是为什么呢?有方法解决吗?
void CDocManager::OnFileOpen() [color=FF0000]这是内函的函数来的[/color]
{
// prompt the user (with all document templates)
CString newName;
if (!DoPromptFileName(newName&&m_strMane, AFX_IDS_OPENFILE,
OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, TRUE, NULL))
return; // open cancelled
AfxGetApp()->OpenDocumentFile(newName);
// if returns NULL, the user has already been alerted
}
如何取到newname的值到CView那里呢?都试过很多方法,也不行~!这是为什么呢?有方法解决吗?