关于工具栏的设置问题

zihengdong 2006-06-23 03:45:33
我想在点击工具栏的打开时,在弹出的对话框中可以控制文件的显示类型,并可以选择多个文件,请问该怎样设置,多谢~
...全文
149 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zihengdong 2006-06-23
  • 打赏
  • 举报
回复
我指的单击,是单击"打开"按钮
zihengdong 2006-06-23
  • 打赏
  • 举报
回复
不是的,我是想在单击工具栏的时候,在弹出的对话框中可以同时选择多个文件
不知道怎么完成,请给出实现步骤,多谢
xazl 2006-06-23
  • 打赏
  • 举报
回复
你提的这个问题和工具栏无关啊!
你是不是想问CFileDialog的使用啊
// szFilters is a text string that includes two file name filters:
// "*.my" for "MyType Files" and "*.*' for "All Files."
TCHAR szFilters[]= _T("MyType Files (*.my)|*.my|All Files (*.*)|*.*||");

// Create an Open dialog; the default file name extension is ".my".
CFileDialog fileDlg (TRUE, _T("my"), _T("*.my"), OFN_FILEMUSTEXIST,szFilters, this);

// Display the file dialog. When the user clicks OK, fileDlg.DoModal()
// returns IDOK.
if( fileDlg.DoModal ()==IDOK )
{
CString pathName = fileDlg.GetPathName();

// Implement opening and reading of the file here.
// Change the title of the window to the title of the opened file.
CString fileName = fileDlg.GetFileTitle ();

SetWindowText(fileName);
}

15,975

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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