This example shows how to detect (and deny) memory changes. This technique is usefull when you need to detect
MyProperties->Visible = false;
And automatically call ShowWindow().
The detection is based on structured exception handling, here MyProperties->Visible is placed in memory with read only access, so any write attempt will generate exception, where the handler code first allows the write, then calls OnMemoryChange where you can do some actions, or restore the changed value.
EDIT: added practical example, in OnControl a single "properties->Minimize = true;" minimizes the window.
Quote from: sapero on October 02, 2007, 03:59:03 AM
This technique is usefull when you need to detect
lol :)
good one!