Link to home
Start Free TrialLog in
Avatar of lsimaozinho
lsimaozinho

asked on

File changed notification

Hi,
I need to do the following in my MDI application:
If the file associated with the active view changes by other application then when the user returns to my application
one message box must warn this.

I have think to do the following: Save the modified time and each the OnSetFocus message is sent to the view, compare it with a new modified time reading.
The problem is that this message is always being sent after the message box ends. More each window in my application that loses focus to my view will trigger this message.
Can I filter this to only accept OnSetFocus from alien windows?
Is there a better way to spy file changes?

I am looking for comments on my solution and of course how to solve the problem if this is the right way to do things.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ooops, forgot something - be sure to insert 'CloseHandle ( hNotify);' before the 'return' statement... Sorry ;-)
Avatar of lsimaozinho
lsimaozinho

ASKER

Thanks jkr