File Types Automatically Open With My Program

This is a discussion on File Types Automatically Open With My Program within the Windows Programming forums, part of the Platform Specific Boards category; How do I make it so that .txt files are automatically opened in my Notepad application instead of in the ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    73

    File Types Automatically Open With My Program

    How do I make it so that .txt files are automatically opened in my Notepad application instead of in the real Notepad?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,630

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    73
    One more question, how can I open more than one type of file.
    Here is my code.
    Code:
    strcat(filter,"Text Files"); \\ Want to open .txt and .npp (notepad plus files, the name of the program)
    int index = strlen(filter) + 1;
    filter[index++] = '*';
    filter[index++] = '.';
    filter[index++] = 't';
    filter[index++] = 'x';
    filter[index++] = 't';
    if(GetOpenFileName(&open_params))
    {
    .....
    }

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,630
    MSDN example: Using Common Dialog Boxes

    OPENFILENAME Structure

    Seach these boards for even more examples.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. Totally confused on assigment using linked lists
    By Uchihanokonoha in forum C++ Programming
    Replies: 8
    Last Post: 01-05-2008, 03:49 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 09:46 AM
  4. how to make certain file types open IN your program
    By DarkViper in forum Windows Programming
    Replies: 4
    Last Post: 02-06-2003, 10:37 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

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