home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!utcsri!torn!cunews!nrcnet0!emr1!jagrant
- From: jagrant@emr1.emr.ca (John Grant)
- Subject: read-only filename template in COMMDLG GetOpenFilename
- Message-ID: <1992Sep16.043133.4676@emr1.emr.ca>
- Organization: Energy, Mines, and Resources, Ottawa
- References: <1992Sep16.042818.4073@emr1.emr.ca>
- Date: Wed, 16 Sep 1992 04:31:33 GMT
- Lines: 19
-
- How can I make the filename template used in the Common
- Dialog function GetOpenFilename non-editable, i.e. READ-ONLY!
-
- Suppose an application only recognizes two file types:
- *.XYZ and *.ABC
- I supply a table of those 2 templates to GetOpenFilename. Yes the user
- can select either of the templates from the table, but they can also
- edit the template, i.e. *.* and choose a file which is NOT *.XYZ or
- or *.ABC. This seems pretty silly. Now when I return from
- GetOpenFilename, I have to parse the filename myself and ensure that the
- filename extension is either .XYZ or .ABC. If not, I have to pop up an
- error message and call GetOpenFilename AGAIN! Wouldn't it be a lot
- simpler if the template was READ-ONLY? GetOpenFilename may as well not
- have user-supplied templates & just do *.* and require user to check it!
-
- Plainly put, from the point of view of the application, if it isn't .XYZ
- or *.ABC then it is an unrecognized file! There is no room for creative
- file-naming or user-preferred names! Imagine the confusion if people
- used names like XXX.ABC instead of XXX.BMP or XXX.ZAP instead of XXX.EXE?
-