Check if file is open before saving to rtf

General TRichView support forum. Please post your questions here
Post Reply
Nate
Posts: 1
Joined: Tue Aug 26, 2008 5:30 pm

Check if file is open before saving to rtf

Post by Nate »

I have a program that saves the contents of Richview to an rtf file. If the intended path is a file that is already open, the program crashes. How can I check for this so that I can provide a message to the user to close the file, so that they never get to the point of crashing?

Thanks!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If the file is already used and cannot be opened for saving, SaveRTF just returns False. No crashes must happen.
Post Reply