getting file type from dialog

This is a discussion on getting file type from dialog within the Windows Programming forums, part of the Platform Specific Boards category; I made an open dialog using the OPENFILENAME. I'm wandering how to get the file extention when the user selects ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Location
    Phoenix, Arizona
    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,831
    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, 05: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, 11:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21