Create a registry key under HKEY_CLASSES_ROOT, with your file extension. You then have to create another key under that one, called shell, then under shall, one called open, then, under open, cmd, and the default value should be your application's path, followed by %1:
Code:
HKEY_CLASSES_ROOT
  myext
    shell
      open
        cmd
           (Default) = "c:\myapp.exe" %1
There are a few other settings that you need to add in there as well, but you should be able to figure them out with a little bit of registry diving =).

Z.