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

Thread: CFileDialog

  1. #1
    Join Date
    Aug 1999
    Posts
    3

    CFileDialog

    Is there a way to attach the CFileDialog Open/Save File dialog box to a window? I want an open file
    area incorporated into a window I am making.


  2. #2
    Join Date
    Jul 1999
    Location
    Pasadena, CA - USA
    Posts
    351

    Re: CFileDialog

    Hi,

    This should give you an idea of how to do it...


    void CSoftBMPDlg::OnTestFile()
    {
    static char BASED_CODE szFilter[] = "Bitmap Files (*.bmp)|*.bmp ||";
    CString strFile;

    CFileDialog fd(TRUE, _T("*.BMP"), _T("*.BMP"), OFN_READONLY, szFilter, this);

    if(fd.DoModal()==IDOK)
    {
    strFile = fd.GetPathName();
    AfxMessageBox(strFile);
    }
    }




    Lookup CFileDialog in the help for a description of it's parameters.



    Regards,

    Paul Belikian

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