exit button

Hi all,
Can any help me to make "exit" function for SDI application with ViewForm base class.
In the dialog base, it is very easy. But in SDI , i do not know how to make exit function for a button.
Thank you
Jindo
[240 byte] By [Jindo] at [2007-11-18 19:18:13]
# 1 Re: exit button
I don't know if i understand you correct, but if you just want to terminate the app - in the button OnClick function just call PostQuitMessage(0).
xperson at 2007-11-11 1:17:51 >
# 2 Re: exit button
Originally posted by Jindo
Hi all,
Can any help me to make "exit" function for SDI application with ViewForm base class.
In the dialog base, it is very easy. But in SDI , i do not know how to make exit function for a button.
Thank you
Jindo

AfxGetMainWnd( )->PostMessage(WM_CLOSE);
Alin at 2007-11-11 1:18:58 >
# 3 Re: exit button
Originally posted by xperson
I don't know if i understand you correct, but if you just want to terminate the app - in the button OnClick function just call PostQuitMessage(0).
Well...you should rather send a 'WM_CLOSE' message to allow MFC to do its proper cleanup etc.
Andreas Masur at 2007-11-11 1:20:00 >