void CMyView::OnMouseMove(UINT nFlags, CPoint point)
{ if(m_capture==TRUE)
{
m_rect.SetRect(0,0,0,0);
point.y=point.y+m_offset.cy-25; point.x=point.x+2;
if(point.y<m_parect.Height()&&point.x<m_parect.Width()&&point.y>0&&point.x>0) return;
::ClientToScreen(AfxGetMainWnd()->m_hWnd,&point);
m_cdc.LPtoDP(&point);
m_actwnd=::WindowFromPoint(point);
if(m_actwnd==AfxGetMainWnd()->m_hWnd) return;
if(m_actwnd!=m_cmpwnd)
{ ::InvalidateRgn(m_cmpwnd,NULL,TRUE);
Sleep(50);
m_cmpwnd=m_actwnd;
::GetWindowRect(m_actwnd,m_rect);
m_cdc.LPtoDP(m_rect);
m_rect.InflateRect(-5,-5);
m_cdc.MoveTo(m_rect.left,m_rect.top);
m_cdc.LineTo(m_rect.right,m_rect.top);
m_cdc.LineTo(m_rect.right,m_rect.bottom);
m_cdc.LineTo(m_rect.left,m_rect.bottom);
m_cdc.LineTo(m_rect.left,m_rect.top);
} }
CView::OnMouseMove(nFlags, point);
}
void CMyView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(m_capture)
{
ReleaseCapture();
m_capture=false;
::InvalidateRgn(m_cmpwnd,NULL,TRUE);
}
CView::OnLButtonUp(nFlags, point);
}
void CMyView::OnLButtonDown(UINT nFlags, CPoint point)
{ m_capture=TRUE;
SetCapture();
::SetCursor(::LoadCursor(NULL,IDC_CROSS));
}CRect m_clirect;
::GetWindowRect(AfxGetMainWnd()->m_hWnd,m_parect);
::GetClientRect(AfxGetMainWnd()->m_hWnd,m_clirect); m_offset.cy=m_parect.Height()-m_clirect.bottom;CMyView::CMyView():m_size(100,100),
m_point(0,0),
m_offset(0,0)
{
// TODO: add construction code here
m_capture=false; HDC m_dc=::GetDC(NULL);
m_cdc.Attach(m_dc);
OnPrepareDC(&m_cdc);
m_pen.CreatePen(PS_SOLID,2,RGB(212,123,57));
m_cdc.SelectObject(&m_pen);
}
高手帮帮我呀 我在模仿alasend这个软件中的捕获窗口 的功能 ,你可以到百度上搜这个软件,可是出现了两个问题无法解决.高手帮我呀
现在问题有两点1:第一点是图层问题 我如何让我哪个CASE得窗口不被画 ,2:让任务栏 和其他得栏在清除时能够彻底清除干净,这样得话就能基本满足要求了
图层问题时一定保证画线时 不是在表面画 而是在里面画 ,能够屏蔽掉就可以了 我觉得画线实现上没有那么简单 ,还有就是擦除方面也没有那么简单
恩 不知道哪个软件的作者 是怎么实现的 真牛笔 你用ALASEND 看看 他就没有留下垃圾 并且超完美
{ if(m_capture==TRUE)
{
m_rect.SetRect(0,0,0,0);
point.y=point.y+m_offset.cy-25; point.x=point.x+2;
if(point.y<m_parect.Height()&&point.x<m_parect.Width()&&point.y>0&&point.x>0) return;
::ClientToScreen(AfxGetMainWnd()->m_hWnd,&point);
m_cdc.LPtoDP(&point);
m_actwnd=::WindowFromPoint(point);
if(m_actwnd==AfxGetMainWnd()->m_hWnd) return;
if(m_actwnd!=m_cmpwnd)
{ ::InvalidateRgn(m_cmpwnd,NULL,TRUE);
Sleep(50);
m_cmpwnd=m_actwnd;
::GetWindowRect(m_actwnd,m_rect);
m_cdc.LPtoDP(m_rect);
m_rect.InflateRect(-5,-5);
m_cdc.MoveTo(m_rect.left,m_rect.top);
m_cdc.LineTo(m_rect.right,m_rect.top);
m_cdc.LineTo(m_rect.right,m_rect.bottom);
m_cdc.LineTo(m_rect.left,m_rect.bottom);
m_cdc.LineTo(m_rect.left,m_rect.top);
} }
CView::OnMouseMove(nFlags, point);
}
void CMyView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(m_capture)
{
ReleaseCapture();
m_capture=false;
::InvalidateRgn(m_cmpwnd,NULL,TRUE);
}
CView::OnLButtonUp(nFlags, point);
}
void CMyView::OnLButtonDown(UINT nFlags, CPoint point)
{ m_capture=TRUE;
SetCapture();
::SetCursor(::LoadCursor(NULL,IDC_CROSS));
}CRect m_clirect;
::GetWindowRect(AfxGetMainWnd()->m_hWnd,m_parect);
::GetClientRect(AfxGetMainWnd()->m_hWnd,m_clirect); m_offset.cy=m_parect.Height()-m_clirect.bottom;CMyView::CMyView():m_size(100,100),
m_point(0,0),
m_offset(0,0)
{
// TODO: add construction code here
m_capture=false; HDC m_dc=::GetDC(NULL);
m_cdc.Attach(m_dc);
OnPrepareDC(&m_cdc);
m_pen.CreatePen(PS_SOLID,2,RGB(212,123,57));
m_cdc.SelectObject(&m_pen);
}
高手帮帮我呀 我在模仿alasend这个软件中的捕获窗口 的功能 ,你可以到百度上搜这个软件,可是出现了两个问题无法解决.高手帮我呀
现在问题有两点1:第一点是图层问题 我如何让我哪个CASE得窗口不被画 ,2:让任务栏 和其他得栏在清除时能够彻底清除干净,这样得话就能基本满足要求了
图层问题时一定保证画线时 不是在表面画 而是在里面画 ,能够屏蔽掉就可以了 我觉得画线实现上没有那么简单 ,还有就是擦除方面也没有那么简单
恩 不知道哪个软件的作者 是怎么实现的 真牛笔 你用ALASEND 看看 他就没有留下垃圾 并且超完美
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货