Alerting the user when an open file has been changed by another application
Everytime, when a document was opened, or saved as.. the document-class starts a thread. In this thread, changes will detected in the current directory with a FinfFirstChangeNotification()-Event. If this event is signaled by the system the last-write-time of the actual file will be compared. If the comparison failed, the alarm will start.
If the main window isn't at the top, the icon in the taskbar will flash until the user activate the app.
To test the demo, open a textfile, open the same textfile with notepad. When you save the notepad text, then the alarming will become apparent.
Another test is renaming an open textfile with the windows explorer.
Date Last Updated: April 24, 1999

Comments
Can't get it work under Windows 95
Posted by Legacy on 05/13/1999 12:00amOriginally posted by: Michael Kuelshammer
ReplyCan't get it working under 95
Posted by Legacy on 05/10/1999 12:00amOriginally posted by: Joe Finnerty
ReplySolution for UpdateAllViews
Posted by Legacy on 05/06/1999 12:00amOriginally posted by: Franky Braem
ReplyUsing FindNextChangeNotification
Posted by Legacy on 04/26/1999 12:00amOriginally posted by: Paul Reynolds
I noticed that the code closes the handle as soon as a file is found...
FindNextChangeNotification() is provided so that you don't need to keep closing and calling FindFirstChangeNotification().
Reply