我刚学,本来认为CDC的都是用logic的坐标;
可以在VC技术内幕里有:
void CEx05cView::OnDraw(CDC* pDC)
{
    CBrush brushHatch(HS_DIAGCROSS, RGB(255, 0, 0));
    CPoint point(0, 0);                  // logical (0, 0)    pDC->LPtoDP(&point);                 // In device coordinates,
怎么变为device coordinates后调用了SetBrushOrg啊?
    pDC->SetBrushOrg(point);             //  align the brush with
                                         //  the window origin
    pDC->SelectObject(&brushHatch);
    pDC->Ellipse(CRect(m_pointTopLeft, m_sizeEllipse));
    pDC->SelectStockObject(BLACK_BRUSH); // Deselect brushHatch
    pDC->Rectangle(CRect(100, -100, 200, -200)); // Test invalid rect
}

解决方案 »

  1.   

    呵呵,自己的认为不一定是准确的,看MSDN吧。
    Parameters
    x
    Specifies the x-coordinate (in device units) of the new origin. This value must be in the range 0–7.y
    Specifies the y-coordinate (in device units) of the new origin. This value must be in the range 0–7.point
    Specifies the x- and y-coordinates of the new origin. Each value must be in the range 0–7. You can pass either a POINT structure or a CPoint object for this parameter.
      

  2.   

    那一般CDC下的是不是logic的坐标?