You need to handle WM_CLOSE (OnClose in MFC) and refrain from calling the
base class (which calls DestroyWindow).
--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com /* MVP tips tricks and essays web site */
http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */
"RobertK" <sf****@noip.org> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...
Hi
i wonder how to avoid (trap) closing Form when user
clicks 'X' button in right-top corner of the form.
has anybody idea how to do it?
thanks in advance.
Regards, Robert