-
October 14th, 2008, 07:04 AM
#1
OpenFileDialog
Hi All
I need to open a fileDialog.But i havn't got it.I am abel to open a CFolderDialog.I am useing this code for open a FolderDialog
Code:
GetDlgItemText(IDC_EDIT1, m_Make);
CFolderDialog dlg(_T("Open"), m_Make, this);
if( dlg.DoModal() == IDOK )
{
SetDlgItemText(IDC_EDIT1, dlg.GetFolderPath());
GetDlgItemText(IDC_EDIT1,m_Make);
}
So plz tell me ho can i openFileDialog.Plz help me
-
October 14th, 2008, 07:07 AM
#2
Re: OpenFileDialog
The word is "please".
What's a CFolderDialog?
What happens when you try to run or compile your code?
You mention a file dialog and a folder dialog? Which do you want?
Perhaps you're looking for the CFileDialog class.
-
October 14th, 2008, 07:54 AM
#3
Re: OpenFileDialog
Originally Posted by GCDEF
The word is "please".
What's a CFolderDialog?
What happens when you try to run or compile your code?
You mention a file dialog and a folder dialog? Which do you want?
Perhaps you're looking for the CFileDialog class.
CFolderDialog is class.Code is runing ell but it's only shoing folder option and i want to show file option also.
Code:
Perhaps you're looking for the CFileDialog class
Yes i am looking CFileDialog.
-
October 14th, 2008, 09:18 AM
#4
Re: OpenFileDialog
static TCHAR Filter[] = _T("TextFile|*.txt|All File |*.*||");
CFileDialog fileDlg(TRUE,NULL,NULL,OFN_EXPLORER ,Filter,NULL,NULL);
fileDlg.doModal();
is it ok ?
My English is very bad. So tell me if Something I talked make u confuse.
My Ebook Store: www.coding.vn/book.php
-
October 14th, 2008, 11:26 PM
#5
Re: OpenFileDialog
Originally Posted by zkidkid
static TCHAR Filter[] = _T("TextFile|*.txt|All File |*.*||");
CFileDialog fileDlg(TRUE,NULL,NULL,OFN_EXPLORER ,Filter,NULL,NULL);
fileDlg.doModal();
is it ok ?
Thanks it,s working
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|