2012年2月20日 星期一

None Border Dialog drag moving method

Set the dialog "Border" property to none , re-sizing or thin the dialog won't be able to be dragged moving

If you don't want the border of a dialog but also need the dragging feature, send WM_NCLBUTTONDOWN Message @ OnLButtonDown();


void CDlgExample::OnLButtonDown(UINT nFlags, CPoint point)
{
SendMessage(WM_NCLBUTTONDOWN,HTCAPTION,0);
CDialog::OnLButtonDown(nFlags, point);
}

沒有留言:

張貼留言