A native file format? There's no tutorial for this lol. Give your file it's own extension and that's pretty much it...
The internal data to that file otherwise, is just something specifically readable/recognizable by your program. For too many people this seems to be a deceiving thing, but it's not complex at all. Giving a file extension it's own "icon" is basically just a registry edit/addition.