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

Thread: CFileDialog?

  1. #1
    Join Date
    Jul 2002
    Posts
    88

    CFileDialog?

    i'm not quite sure if this is the right MFC to use...but what i'm trying to do is take a user prompt like CFileDialog that allows the user to open or save files, except that rather than to view the local directories, i want it to be able to view/choose online documents. is there a way to use this to implement such a function? if so, how? if not, is there any other way? thanks in advance..

  2. #2
    Join Date
    Nov 2001
    Location
    Beyond Juslibol
    Posts
    1,688
    what do you want to say with "online"?

  3. #3
    Join Date
    Jul 2002
    Posts
    88
    sorry, i guess i should've been more specific...when i say online, i mean like web folders. http, or possibly ftp.

  4. #4
    Join Date
    Jul 2002
    Posts
    88
    would posting what i have so far help perhaps?

    CFileDialog dlg (TRUE, "", NULL,
    OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, _T("JPEG (*.jpg)|*.jpg|GIF (*.gif)|*.gif|All Files (*.*)|*.*|"), NULL);
    dlg.m_ofn.lpstrInitialDir = "c:\\Program Files";
    dlg.DoModal();

    this only gets me into the local program files directory. please help. at this point i'll take any ideas or hunches.

  5. #5
    Join Date
    Jun 2001
    Location
    Michigan
    Posts
    2,222
    Well I know you can open connections across LAN's, for instance I can open the file dialog onto our server using this line of code:

    dlg.m_ofn.lpstrInitialDir = "\\\\Server\\Program Files";

    So if you could setup a directory on your LAN to be mapped to an ftp directory or something you could probably get it working.

    Update:
    Interesting, I just setup a directory on my computer for an ftp account I have on the internet... it worked fine but I couldn't seem to map a network drive (like Z: or something) to it for some reason... explorer wouldn't allow it.
    Last edited by bluesource; September 4th, 2002 at 08:21 AM.

  6. #6
    Join Date
    Oct 2001
    Location
    Dublin, Eire
    Posts
    880
    CFileDialog can get you to navigate online. It is only meant to navigate through you local and network drives, and will not take anything like "http://" as a drive.

    It allows you to select htlm files if you want, but if you want to open and display thenproperly, it is not with CFileDialog that you can do it.

    I don't know how you can include a browswer in your application as I have never done that so far.
    Elrond
    A chess genius is a human being who focuses vast, little-understood mental gifts and labors on an ultimately trivial human enterprise.
    -- George Steiner

  7. #7
    Join Date
    Feb 2000
    Location
    Rennes, France
    Posts
    624
    Do you know if the file chosen in the CFileDialog is tagged in a certain way? that might explain why it is considered as 'in use' afterwards...

    Marina
    Please go vote for your country!

  8. #8
    Join Date
    Jul 2002
    Posts
    88
    thanks all for the input...i'll see what i can do with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)