首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请问 如何关闭窗口 单文档

2012-08-09 
请教 怎么关闭窗口 单文档请教 怎么关闭窗口 单文档void CD12View::OnLButtonDown(UINT nFlags, CPoint po

请教 怎么关闭窗口 单文档
请教 怎么关闭窗口 单文档

void CD12View::OnLButtonDown(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
int x=point.x;
int y=point.y;

if(x>678&&x<940&&y>2760&&y<338)

//SendMessage(WM_CLOSE);

CView::OnLButtonDown(nFlags, point);
}

我就想点击if里的坐标区域 然后关闭界面,怎么弄啊SendMessage不行啊 


[解决办法]
单文档直接onclose,
最简单方法postquitmessage
[解决办法]
AfxGetMainWnd()->DestroyWindow();

热点排行