About the CDocument::OnSaveDocument

If I call this function CDocument::OnSaveDocument( lpszFileName ) and failed,

if the lpszFileName can be created or not?

Thanks
According to MSDN
http://msdn.microsoft.com/en-us/library/sd83ta1b(VS.80).aspx

it will fail if the filename is not fully-qualified (meaning it must not be relative).

It can also fail if you don't have write permission on the target directory or file and some other esoteric things.

Check the result to decide what to do.
If the method returns FALSE then something went wrong.
If the method returns TRUE then the file saved properly.

Good luck!
Last edited on
Topic archived. No new replies allowed.