Creating the association means that anytime someone double-clicks on a file with 'your' extension, your program will be launched and your WinMain will get the file name so you can open the file and do whatever you want with it.
So, if that's what you WANT, then this code is for you (and/or having your installer do it for you).
Pick an extension that no one else is using, or you'll have upset customers. In particular, there can be a large number of extensions for images, sounds, videos, and the like. So go to a 'fully loaded' machine with photoshop or its ilk on it, and then look in the registry under the file classes key and you'll see 50-100 extensions already there. Pick something ELSE.
An easy way to avoid these common other files is to pick an extension longer than 3 chars, though there may be compatability issues on non-windows OS', if that matters to you.