这图中K线的是由矩形和一条竖线形成的;
现在我用Rectangle(x,y,x1,y1);
我想知道的是,画这个K线图,Rectangle的四个参数是否有什么规律???才能达到那种效果??

解决方案 »

  1.   

    计算矩形,然后CDC::FillSolidRect()即可
      

  2.   

    我现在有一个这样的例子程序,但我不明白Rectangle(x,y,x1,y1);他四个参数是怎么来的,那参数值是怎么计算的饿。
      

  3.   

    四个参数是根据K线来计算的。The Rectangle function draws a rectangle. The rectangle is outlined by using the current pen and filled by using the current brush. BOOL Rectangle(
      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
    );