Thread: file browsing

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    8

    Question file browsing

    Hi all,
    I have a problem where i want to create a program to read a file from computer and i want to read that file. I've figure out how to read the file using fread funtion. Another problem however is to make the program to able to pop up the explorer window to find/search the file. Is there any special function that can do that in C?

    The situation is:
    This program will open a file explorer box on request (such as in picture below),

    file browsing-open-dialog-box-1-png

    the user will the press the select file button then a pop-up windows like below will come.

    file browsing-open-dialog-box-png

    the user then can choose the file such as mp3 or text file the open it. the program the will read the file and do something with it.

    Thanks in advance!!!!

    p/s: I'm using Linux Fedora 15
    Last edited by sharp_wan; 09-30-2011 at 07:56 PM.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Search on the use of the GetOpenFileName function.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    Sep 2011
    Posts
    8
    Ow i see, so this only possible for windows right? Sorry I forgot to mention that I'm using Linux Fedora 15.

  4. #4
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Oh, there may be an equivalent. Perhaps someone else can shed some light. You said explorer window and I thought "Windows" as in Microsoft.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Selecting/Browsing to find a file
    By Tripod87 in forum C Programming
    Replies: 1
    Last Post: 08-04-2008, 11:45 AM
  2. Browsing directory in unix
    By Jaykar in forum Linux Programming
    Replies: 2
    Last Post: 10-19-2007, 03:34 AM
  3. browsing through history commands
    By apsync in forum C Programming
    Replies: 9
    Last Post: 05-22-2007, 04:54 AM
  4. Directory browsing
    By earth_angel in forum C++ Programming
    Replies: 4
    Last Post: 07-26-2005, 08:37 AM
  5. Group browsing
    By Mithoric in forum Networking/Device Communication
    Replies: 0
    Last Post: 08-30-2003, 08:46 AM