|
-
June 10th, 1999, 07:40 AM
#1
Forcing a user to drop during a drag
Hi,
I am trying to find a way to cause a user to drop the main window while it is being dragged under certain conditions.
I use the following code to allow the user to drag the window by clicking anywhere on the dialog.
void CMyWin::OnLButtonDown(UINT nFlags, CPoint point)
{
PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));
CDialog::OnLButtonDown(nFlags, point);
}
to make them drop it I tried this:
void CMyWin::OnMouseMove(UINT nFlags, CPoint point)
{
if(bDrop)
SendMessage( WM_NCLBUTTONUP, HTCAPTION, MAKELPARAM( point.x, point.y));
CDialog::OnMouseMove(nFlags, point);
}
I also tried to send a plain WM_LBUTTONUP and that didn't work either.
Does anyone have any ideas?
Cheers
James
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|