15,978
社区成员
发帖
与我相关
我的任务
分享
dc.Rectangle( CRect( 0, 0, 200 , 200));当移动后,依然画在了原点上。
void CLogiShowArea::OnPaint()
{
CPaintDC dc(this); // device context for painting
dc.SetWindowOrg( GetScrollPos( SB_HORZ), GetScrollPos( SB_VERT));
// TODO: Add your message handler code here
CBrush * pOldBr = dc.SelectObject( &m_brBg);
CRect rcClip;
dc.GetClipBox( rcClip);
// dc.FillRect( rcClip, &m_brBg);
dc.Rectangle( CRect( 0, 0, 200 , 200));
dc.SelectObject( pOldBr);
}
CPaintDC dc(this); // device context for painting
dc.SetWindowOrg( GetScrollPos( SB_HORZ), GetScrollPos( SB_VERT));
// TODO: Add your message handler code here
CBrush * pOldBr = dc.SelectObject( &m_brBg);
CRect rcClip;
dc.GetClipBox( rcClip);
// dc.FillRect( rcClip, &m_brBg);
dc.Rectangle( CRect( 0, 0, 200 , 200));
dc.SelectObject( pOldBr);