You need to make some registry entries. First you need to associate the file extension with a class name (class name can be anything, just make it up).
So for example, if I wanted to associate .foo extensions with my Blah.exe program I would create the following registry entries (Note: In this case I'm associating .foo with a class called Foo.Document, then associated that class with my program):
Key: HKLM\SOFTWARE\Classes\.foo
Value: = “Foo.Document”
Key: HKLM\SOFTWARE\Classes\Foo.Document
Value: = “Foo Document”
Key: HKLM\SOFTWARE\Classes\Foo.Document\shell\open\command
Value: = “[blah.exe]” “%1″