closing form

  • Thread starter Thread starter RobertK
  • Start date Start date
R

RobertK

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
 
You need to handle WM_CLOSE (OnClose in MFC) and refrain from calling the
base class (which calls DestroyWindow).
 
U¿ytkownik "Nishant S said:
You need to handle WM_CLOSE (OnClose in MFC) and refrain from calling the
base class (which calls DestroyWindow).

no:(
to avoid closing .Net form i need to pass e->Cancel = true in
Closing event arguments.


About MFC:
i know:)

Regards, RobertK
 
Back
Top