这个程序怎么改?总是出现错误error C2601:“CBMPtoAVIDlg::choisebmppath”: 本地函数定义是非法的 15
HCURSORCBMPtoAVIDlg::OnQueryDragIcon(){returnstatic_cast<HCURSOR>(m_hIcon);char*CBMPt...
HCURSOR CBMPtoAVIDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
char* CBMPtoAVIDlg::choisebmppath(HWND hWnd,CHAR *szTitle, CHAR *szPath)//获得文件夹
{
BROWSEINFO bi;
LPCITEMIDLIST pItemIDList;
bi.hwndOwner = AfxGetMainWnd()->GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = szPath;
bi.lpszTitle = szTitle;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.iImage = 0;
pItemIDList = SHBrowseForFolder(&bi);
if(NULL == SHGetPathFromIDList(pItemIDList, szPath) )
{
AfxMessageBox("路径为获取");
}
return (char*)szPath;
}
} 展开
{
return static_cast<HCURSOR>(m_hIcon);
char* CBMPtoAVIDlg::choisebmppath(HWND hWnd,CHAR *szTitle, CHAR *szPath)//获得文件夹
{
BROWSEINFO bi;
LPCITEMIDLIST pItemIDList;
bi.hwndOwner = AfxGetMainWnd()->GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = szPath;
bi.lpszTitle = szTitle;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.iImage = 0;
pItemIDList = SHBrowseForFolder(&bi);
if(NULL == SHGetPathFromIDList(pItemIDList, szPath) )
{
AfxMessageBox("路径为获取");
}
return (char*)szPath;
}
} 展开
展开全部
改成这样就OK啦:
HCURSOR CBMPtoAVIDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
char* CBMPtoAVIDlg::choisebmppath(HWND hWnd,CHAR *szTitle, CHAR *szPath)//获文件夹
{
BROWSEINFO bi;
LPCITEMIDLIST pItemIDList;
bi.hwndOwner = AfxGetMainWnd()->GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = szPath;
bi.lpszTitle = szTitle;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.iImage = 0;
pItemIDList = SHBrowseForFolder(&bi);
if(NULL == SHGetPathFromIDList(pItemIDList, szPath) )
{
AfxMessageBox("路径获取");
}
return (char*)szPath;
}
HCURSOR CBMPtoAVIDlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
char* CBMPtoAVIDlg::choisebmppath(HWND hWnd,CHAR *szTitle, CHAR *szPath)//获文件夹
{
BROWSEINFO bi;
LPCITEMIDLIST pItemIDList;
bi.hwndOwner = AfxGetMainWnd()->GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = szPath;
bi.lpszTitle = szTitle;
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.iImage = 0;
pItemIDList = SHBrowseForFolder(&bi);
if(NULL == SHGetPathFromIDList(pItemIDList, szPath) )
{
AfxMessageBox("路径获取");
}
return (char*)szPath;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询