CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: OpenFileDialog

  1. #1
    Join Date
    Mar 2008
    Posts
    18

    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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    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.

  3. #3
    Join Date
    Mar 2008
    Posts
    18

    Re: OpenFileDialog

    Quote 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.

  4. #4
    Join Date
    Oct 2008
    Posts
    116

    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

  5. #5
    Join Date
    Mar 2008
    Posts
    18

    Re: OpenFileDialog

    Quote 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
  •  





Click Here to Expand Forum to Full Width

Featured