Results 1 to 5 of 5

Thread: setting up a file association

  1. #1
    Guest

    Wink

    Can anyone tell me how I can set up a file association between my application and files with the extension ".sce".

    So that when I double click the file, my application pops up and displays the file (i just need to know how to capture the filename from within the app for the displaying part).

    So in other words how do I make Windows know that MY app is the one that is in charge of .SCE files? (in the same way that MS Excel is "in charge" of .XLS files). Also I would like to be able to specify an icon for my .SCE files.

    Thank you,

    Adam

  2. #2
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217
    You need to change/set the file associations for the type of file that you want your program to be responsible for. This is changed/assigned in the registry, under the following Key:
    HKEY_CLASSES_ROOT

    Just be sure to allow the user to choose this feature if you change any existing associations, or at the very least make sure that your uninstaller will re-associate the file types with the correct applications (store the original associations in a file or in the registry because it might not be the application that you assume it to be).

    Hope this is what you were looking for.

  3. #3
    Guest
    hmm, thanks for the reply, but i fear im non the wiser!

    How can I alter the stuff in the Hkey... part of the registry? (as far as i know there is no other program that uses .sce files)

    Anyone know how to use the Command() function to get the arguments out?

  4. #4
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ottawa,ON,Canada
    Posts
    217

    Arrow

    There are lots of good examples in this forum, all you have to do is search. I suggest looking for RegSetValueEx and RegQueryValueEx, I know I've posted some code on these before, and I'm sure others have as well. If you're too lazy to do this or you still can't figure it out just post again and I'll explain it in detail, I just don't see a need for it.

    Ciao for now.

  5. #5
    Guest

    Cool Okey dokey

    I am lazy but Ill make the effort this time!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width