Map's native format is just .txt to keep it simple and flexible, so I set up an OPENFILENAME structure for GetSaveFileName with "txt" as the default extension. Unfortunatley I found that even if I set the filter to *.*, it was still appending .txt to the files and when I tried test.xxx, it returned a file called test.xxx.txt, which is a bit annoying.
I can't parse out the extension afterwards since there is no way of knowing whether the extension was appended automatically or typed by the user and I don't want to not provide a default extension since I want .txt appended if the user doesn't type an extension.
Thinking about this as I type (the main reason for gibbering all this nonsense in a journal after all), a solution could be to not provide a default extension but to examine the filename after the dialog is done and manually append an extension if none is provided. That would work. Surely though the standard dialog must have a built in solution for this, although I always struggle to create a file with Notepad without a .txt extension so perhaps not.
Anyway, the current task is putting the New dialog together. Stuff like this, I really miss the ease of Builder for click-dragging stuff together but it is a small price to pay.
I think when it is done, I'm going to create a mini-site on my GameDev webspace and put it on there for release. I don't really think I should put tools like this in the Showcase but enough people expressed an interest in creating levels for Orc that I want it available somewhere. It will work as a level editor for the next project as well.
Still, all in I'd call this experiment with using the Win32 API directly a resounding success and I can't see me running Builder much in the future. Builder has been a very good basis to move onto Win32 since it wraps it quite closely but it is a lot more satisfying to grapple with the API directly.