Is there a simple solution to the problem of a "Your text has been altered, do you wish to save yes/no" dialog on exit?
I was thinking along the lines of trapping the WM_CHAR message and setting a flag but you could alter the text in the window by using the mouse and >edit>cut. alone, for instance.
I would have thought that there was an api for this but can't find one...
Any thoughts?
Peter.
Went to MSDN and What!? The built-in Windows controls are under the topic of Windows Shell.
If this is an EDIT control, there is a EM_GETMODIFY message you can send to get this information.
invoke SendMessage, hEditControl, EM_GETMODIFY, 0, 0
invoke SendDlgItemMessage, hWindow, idEditControl, EM_GETMODIFY, 0, 0
EAX = 0, if no changes detected.
Haven't tested it for cut-and-paste.
Thanks Tenkey, I felt sure that there was going to be an easy solution to this. Just for the life of me couldn't find it.
Peter.
petezl,
You need to start searching the API. This is beginning to be a mantra...
searching the API
searching the API
searching the API
searching the API
searching the API
Paul
Thanks Tenkey, Worked a treat.
Paul, Searching is fine when you have in mind a keyword to search for!
Peter.
petezl,
That is very true, I am glad the solution was so close to hand. Good luck with your project.
Paul