Thread: getting file type from dialog

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    26

    getting file type from dialog

    I made an open dialog using the OPENFILENAME. I'm wandering how to get the file extention when the user selects a file.
    thanks.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    From the MSDN help for OPENFILENAME...

    lpstrFileTitle
    Pointer to a buffer that receives the file name and extension (without path information) of the selected file. This member can be NULL.

    ... so supply a buffer and it will tell you.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  5. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM