DoubleLi

qq: 517712484 wx: ldbgliet

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
参考文章:http://tech.sina.com.cn/s/2006-07-25/09051053460.shtml


响应WM_NCHITTEST消息


函数实现如下:


//////////////////
// Non-client hit-test handler to move window by its client area.
// If the user clicks anywhere on the client area, pretend it's the
// caption. Windows does the rest!
UINT CMyDialog::OnNcHitTest(CPoint pt)
{
 CRect rc;
 GetClientRect(&rc);
 ClientToScreen(&rc);
 return rc.PtInRect(pt) ? HTCAPTION : CDialog::OnNcHitTest(pt);
}
posted on 2013-09-30 08:58  DoubleLi  阅读(387)  评论(0)    收藏  举报