File Opener

This is a discussion on File Opener within the Windows Programming forums, part of the Platform Specific Boards category; ofn.lpstrFilter = "Text Files (*.txt)

Thread: File Opener

*.txt

Thread: File Opener

Doc Files (*.doc)

Thread: File Opener

*.doc

Thread: File Opener

All Files (*.*)

Thread: File Opener

*.*

Thread: File Opener

Thread: File Opener

"; When I open a file with my prog it gives me ...

  1. #1
    Unregistered
    Guest

    Question File Opener

    ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0Doc Files (*.doc)\0*.doc\0All Files (*.*)\0*.*\0\0";

    When I open a file with my prog it gives me 3 values

    Text File (*.txt)
    Doc Files (*.doc)
    All Files (*.*)

    How do I make one that says and opens

    All Supported Formats

    Any response would be greatly appreciated.

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Try,
    All Supported Formats\0*.txt, *.doc\0
    or,
    All Supported Formats\0*.txt | *.doc\0

    I know it's something like that.

  3. #3
    Unregistered
    Guest

    I've tried that allready..

    I have tried that allready,
    it didn't work.

    Could it be my compiler?

    I use Dev C++ by Bloodshed

    OR is there any other way of doing it?

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Use a semicolon to seperate the masks eg.

    "Bitmap Files\0*.bmp;*jpg\0\0\0"
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Unregistered
    Guest

    Smile Thanks Much

    That worked great,

    Thank you very much.

Similar Threads

  1. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM
  2. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 11:12 PM
  3. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM