Writing the file with your own extension is the easy part, just use the extension in the filename.. Associating the file with your program is a little more difficult, this link is pretty good at explaining what's involved.
tinstaafl
Nearly a Posting Virtuoso
1,484 posts since Jun 2010
Reputation Points: 429
Solved Threads: 261
Skill Endorsements: 14
The easiest way to associate the file with your application is to right click the file and select "Open with" and "Choose default program". Then browse to your exe file and check "always use the selected program...".
Reverend Jim
Illigitimae non carborundum
3,750 posts since Aug 2010
Reputation Points: 585
Solved Threads: 470
Skill Endorsements: 33