CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Location
    India
    Posts
    215

    Regarding SaveAs Filedialog

    Hi,

    I Created SaveAs FileDialog.
    In that SaveAs FileDialog ,, in SaveIn combobox, i want my required location to be there when the dialog is created.
    How can i get that.

    Regards
    Kiran

  2. #2
    Join Date
    May 2005
    Location
    United States
    Posts
    526

    Re: Regarding SaveAs Filedialog

    Set the lpstrInitialDir member of the OPENFILENAME structure. If you're using the MFC class CFileDialog, that structure is a class member called m_ofn.

  3. #3
    Join Date
    Aug 2002
    Posts
    174

    Re: Regarding SaveAs Filedialog

    // szFilters is a text string that includes two file name filters:
    // "*.my" for "MyType Files" and "*.*' for "All Files."
    char szFilters[]="MyType Files (*.my)|*.my|All Files (*.*)|*.*||";

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

    fileDlg.m_ofn.lpstrInitialDir = "E:\\";
    SG

  4. #4
    Join Date
    May 2002
    Location
    India
    Posts
    215

    Re: Regarding SaveAs Filedialog

    thanku..
    it worked perfectly.
    --Kiran

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