关于OnClose()的一个问题 菜鸟的问题
我建了一个基于CFormView的单文档工程
我在formview中托了一个Button1
在视类中添加了windows message handle WM_CLOSE
自动生成这个
void CMyView::OnClose()
{
// TODO: Add your message handler code here and/or call default
CFormView::OnClose();
}
然后这个按钮Button1的响应函数是这个
void CMyView::OnButton1()
{
// TODO: Add your control notification handler code here
OnClose();
}
我点击按钮 没关掉窗口。没反应,为什么啊,用什么方法可以实现点击formview中的按钮就关掉窗口吗(就像点右上角的关闭按钮那样)?