I am creating a desktop application in which I generate a PDF file, and then present the user with a choice of options of what to do with that file:
- View it (using acrobat)
- Print it on named printer
- Fax it to {get fax number here}
- "Save as" for future use
- Send as email attachment to {get email address here}
The user may choose any or all of these options.
I generate this file to the user's application data folder (CSIDL_APPDATA\named subfolder). (I could use the users "GetTempPath" folder, I'm still thinking about this); the program reaches a point where I know, "A PDF file is ready for the user to select the delivery options" and this is where I present a 'delivery options' screen.
My problem is this:
Users will be generating many, many such files during the time the program is running, and I want to "clean up" all these temp files; that is, the only *.PDF files I want left at the end of the day are those which the user chose to "save as."
Right now the only way I can think of to do this is to do some kind of mass delete on WM_DESTROY of the main application window: I can't delete 'em if the user is still viewing thru Acrobat, or printing 'em, because Acrobat is using 'em.
Does anyone have a better idea?
Thanks,
MCM
- View it (using acrobat)
- Print it on named printer
- Fax it to {get fax number here}
- "Save as" for future use
- Send as email attachment to {get email address here}
The user may choose any or all of these options.
I generate this file to the user's application data folder (CSIDL_APPDATA\named subfolder). (I could use the users "GetTempPath" folder, I'm still thinking about this); the program reaches a point where I know, "A PDF file is ready for the user to select the delivery options" and this is where I present a 'delivery options' screen.
My problem is this:
Users will be generating many, many such files during the time the program is running, and I want to "clean up" all these temp files; that is, the only *.PDF files I want left at the end of the day are those which the user chose to "save as."
Right now the only way I can think of to do this is to do some kind of mass delete on WM_DESTROY of the main application window: I can't delete 'em if the user is still viewing thru Acrobat, or printing 'em, because Acrobat is using 'em.
Does anyone have a better idea?
Thanks,
MCM
Comment