i have more-or-less working dialog code - lol
it works fine, but....
if the user puts in a filename extension, the default extension is also appended to it :red
QuotelpstrDefExt
The default extension. GetOpenFileName and GetSaveFileName append this extension to the
file name if the user fails to type an extension. This string can be any length, but only the first
three characters are appended. The string should not contain a period (.). If this member is NULL
and the user fails to type an extension, no extension is appended.
test code attached....
Not on my PC (Win XP SP2). Are your "known" extensions visible in Explorer?
i typed in "abc.abc", and got this....
(http://img10.imageshack.us/img10/9981/extu.png)
and - i hate when the known extensions are hidden - lol
that's one of the first things i set when i rebuild
anyone else have the same problem as me ?
or does it work on more than one machine ?
Hi,
Yep. Exactly as described. Both with your app (?) and with
WordPad every so often. You can work around this "feature"
by using quotes.
Regards,
Steve N.
thanks, both of you
i was worried there was something wrong with me, my machine, or my code - lol
probably all three :bg
Actually, it is more complicated:
abc.abc yields abc.abc.txt
abc.doc yields abc.doc
Apparently, the OS checks if the extension is known. If not, the default extension will be added.
Hi,
Cute. Went into WordPad and tried to save TEST.ASM and
got TEST.ASM.txt. Went to the Control Panel and added ASM
as a file type and repeated the experiment and got TEST.ASM.
I would never have known that an ASM file has the file type
FT000001. What you can learn in the land of Microsloth.
Cheers,
Steve N.
:P
it can be cleaned up with code, easy enough
Edit: Oh, reading posts from bottom to the top, do not saw that there is answer already (http://www.masm32.com/board/index.php?topic=16199.msg133911#msg133911).