1.CRect类是干吗的,我的理解是定义了一个矩形.2.pDC->Ellipse (CRect(20,40,120,140));
是画一个椭圆~
但我用pDC->Ellipse (20,40,120,140);也画了一个一模一样的椭圆~~
那么CRect有什么用的呢?

解决方案 »

  1.   

    BOOL Ellipse(
      HDC hdc,        // handle to DC
      int nLeftRect,  // x-coord of upper-left corner of rectangle
      int nTopRect,   // y-coord of upper-left corner of rectangle
      int nRightRect, // x-coord of lower-right corner of rectangle
      int nBottomRect // y-coord of lower-right corner of rectangle
    );
    说的很清楚了
      

  2.   

    CRect类用于存储矩形信息BOOL Ellipse( int x1, int y1, int x2, int y2 );BOOL Ellipse( LPCRECT lpRect );
    都是CDC的成员函数
      

  3.   

    不错,这些我知道.但在用Ellipse时,用CRect与不用CRect到底有什么区别?