VC编程改错

D2012LY 2012-11-29 03:28:53
void CDirListCtrl::SetFolder(CString sFile)//函数的实现
{
int index;

if (sFile == "")
return ;

CDirListCtrl m_SysImageList;
m_strPath = sFile;
CImageList * imageList = m_SysImageList.GetImageList( FALSE );
SetImageList(imageList, LVSIL_NORMAL);

CFileFind finder;
int bWorking = finder.FindFile(sFile+"*.*");

if( bWorking )
{
DeleteAllItems();
}
else return;

while( bWorking )
{

bWorking = finder.FindNextFile();
if(!finder.IsDots())
{
HICON icon = m_SysImageList.GetIcon(sFile+finder.GetFileName(), FALSE,FALSE);
index = imageList->Add(icon);

InsertItem( 1, sFile+finder.GetFileName(), index );
}
}

}
065: 'm_strPath' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(48) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class CString' (or there is no acceptable conversion)
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(67) : error C2660: 'GetIcon' : function does not take 3 parameters
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(104) : error C2065: 'strSrcPath' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(104) : error C2065: 'strSelItemPath' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(105) : error C2065: 'strDesPath' : undeclared identifier
C:\Documents and Settings\Administrator\桌面\新建文件夹\MyExplorer\DirListCtrl.cpp(106) : error C2065: 'nOption' : undeclared identifier
DirTreeCtrl.cpp
...全文
96 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengyw 2012-11-29
  • 打赏
  • 举报
回复
copy代码没整完整,估计头文件都没有包含进来
我爱吃火锅 2012-11-29
  • 打赏
  • 举报
回复
很多变量没定义~不懂得错误,百度
xumaojun 2012-11-29
  • 打赏
  • 举报
回复
看提示,那么多变量使用了但是没有定义啊。

64,643

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧