This article is from the Mac Programming FAQ, by Jon Watte email@example.com with numerous contributions by others.
This requires a custom dialog with a filter proc. It is too
complicated to show here, but not totally impossible to comprehend.
There is sample code on ftp.apple.com, in the directory dts/snippets, on
how to do this.