Click here to Skip to main content
15,885,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody
I have created a SDI Doc. and I have implemented a paint program
I want to save this program every 1 minute programmatically.
Please help me

What I have tried:

I have tried GetPathName(),DoFileSave() and some try and errors, but I could not solve this problem.
Posted
Updated 31-Aug-20 19:58pm
v2
Comments
Member 11490990 1-Sep-20 2:11am    
Dear OriginalGriff, Many Thanks for your guidance, but The problem is Auto-save (Saving Program Document Programatically) and not setting a timer.

1 solution

Create a timer, and set it to an interval of one second.
Create a global integer variable count, and set it to minus one.
Set the count to 60 when you load the document.
In the OnTimer event method, check the count.
If it's negative, ignore it.
Otherwise, reduce it by one and check it again.
If it's zero, set it to 60, and save the document

This may help: MFC - Timer - Tutorialspoint[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900