Make a program define a file type?

This is a discussion on Make a program define a file type? within the Tech Board forums, part of the Community Boards category; Well like an installer, what if I had a file type, .azji and I wanted to make a program that ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    76

    Make a program define a file type?

    Well like an installer, what if I had a file type, .azji and I wanted to make a program that would tell Windows (that's what I have atm) that it's an Azjherbeniex file, would open with a certain .exe and give it it's own icon. How can I do that?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    This doesn't really have anything to do with C++ or even programming, so I moved it.

    Open regedit and take a look at HKEY_CLASSES_ROOT. That's where file types are registered. The format simple enough that you can probably figure it out by just looking at it, but you can also Google something like "file type registry" and read all about it.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    76
    How do I do it in C++?

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,413
    Read up Windows Registry functions (MSDN).
    It's basically RegOpenKey / RegSetValueEx (I think) / RegCloseKey.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  2. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  3. Help getting multiple keypresses in a DOS compiler
    By Nongan in forum Game Programming
    Replies: 2
    Last Post: 04-01-2005, 09:07 PM
  4. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 05:05 PM

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