I'm trying to use Backup() and Restore() on a TopWindow, but unable to get it working.
Restore() clears the controls instead of restoring them.
My simple test app is attached.
RejectBreak, invoked by standard Cancel (from CtrlLayoutOKCancel), performs Restore if there was prior Backup.
Meanwhile, Close clears the backup (maybe a bad choice?).
The simple way how to fix your code is not to explicitly call Restore