This requires serious planning and exact code. You need to decide what information you want your file to store, I assume you've figured that out already. Then you need to decide what information your program needs to know for using this file efficiently while running.
Next you have two options:either use an actual ASCII text file, or just use an array. The file format for the level editor of my game is comprised of ten string arrays that store the various aspects of a level for the game. The good thing about this is it makes it difficult for any joe schmoe to open your files in notepad and edit them to his liking. The bad thing about this is anybody with DarkBasic can open up your arrays and change them around that way, and using multiple arrays can give away your file structure if you want to keep that confidential.
The advantage of using a text file is that it can be encrypted by shifting ASCII character values over a few when saving, then moving them back when loading.
Another option is using memblocks, unfortunately my knowledge on them is quite limited, but in the right hands they are powerful.
Once you have your format planned and implemented in code you will have to register it with windows as a recognized file type, usually with an installation program or manually if you don't want to distribute. You also need to make sure that your program can accept files instantly when opened--unfortunately I don't know how to do that.
Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html