代码:
void Ctry::OnTryPath()
{
// TODO: 在此添加命令处理程序代码
vector<string>picture_path;
CFileDialog ldlg(TRUE, "bmp", NULL, OFN_ALLOWMULTISELECT | OFN_ENABLESIZING | OFN_HIDEREADONLY, "bmp文件(*.bmp)|*.bmp|所有(*.*)|*.*||", NULL);
ldlg.m_ofn.lpstrTitle = (_T("请选择路径"));//对话框标题
if (ldlg.DoModal() == IDOK)
{
POSITION lpos = ldlg.GetStartPosition();
while (lpos != NULL)
{
CString lpath = ldlg.GetNextPathName(lpos);
picture_path.push_back(LPCTSTR(lpath));
}
}
}