您的位置:首页 > Web前端

Use of Common Dialogs (offered by the operating system)

2006-02-26 20:49 525 查看
void CDialogsDlg::OnButton2()
{// exaple of CFileDialog
// TODO: Add your control notification handler code here
CFileDialog fd(TRUE); //If the argument is FALSE, it means to open a File Save Dialog,True means File Open Dialog
if (fd.DoModal()==IDOK)
{
MessageBox(fd.GetFileName());
}
}

// The exaple above is the most simple one of CFileDialog, actually, there are other arguments of the function that specify the file extension or defualt directory to be opened and so on...,

// Besides the CFileDialog, there are other common dialogs:

Class Dialog Type
CFileDialog File selection
CFontDialog Font selection
CColorDialog Color selection
CPageSetupDialog Page setup for printing
CPrintDialog Printing
CFindReplaceDialog Find and Replace
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐