Mood: mischievious
Topic: VC++
Have you ever wondered how do people move dialogs by simply clicking anywhere inside the dialog and dragging them. Have you ever wondered how captionless dialogs can be dragged arround. If it is so then let me tell you that you can do the same with just one line of code. Here goes the code: void CNCHitTestProDlg::OnLButtonDown(UINT nFlags, CPoint point) { //here is the code SendMessage(WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM(point.x, point.y)); CDialog::OnLButtonDown(nFlags, point); }
Posted by Nibu babu thomas
at 5:04 PM
Updated: Friday, 18 November 2005 5:07 PM