Re: Taskbar Button and SysMenu ?
I tried your code for moving a dialog while removing Move from the menu.
And I am getting an error message saying that - SetPoint is not member
'CPoint'
Could you post the correction. The error is in OnLButtonUp( ).
void CSqBmpBkgdBorderDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
ptStartPoint = point;
SetCapture();
CDialog::OnLButtonDown(nFlags, point);
}
void CSqBmpBkgdBorderDlg::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(nFlags & MK_LBUTTON && ptStartPoint.x >= 0 && ptStartPoint.y >= 0)
{
CPoint ptDiff = point - ptStartPoint;
CRect rectDialog;
GetWindowRect(rectDialog);
rectDialog.OffsetRect(ptDiff);
SetWindowPos(NULL,rectDialog.left,rectDialog.top,rectDialog.Width(),rectDial
og.Height(),SWP_NOZORDER);
}
CDialog::OnMouseMove(nFlags, point);
}
void CSqBmpBkgdBorderDlg::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
ReleaseCapture();
ptStartPoint.SetPoint(-1,-1); //***error here***
CDialog::OnLButtonUp(nFlags, point);
}