对话框客户区实现拖动
2016-09
睿丰德信息科技有限公司
响应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);
} RFID管理系统集成商 RFID中间件 条码系统中间层 物联网软件集成