我刚学VC不久!请问,在软件中怎样实现(像屏幕抓图软件一样)在屏幕上选取一个矩形区域,并得到所选区域的坐标?谢谢!

解决方案 »

  1.   

    Use 
       SetCapture()
       OnMouseMove()
    to get the rect that you wannt get.
    Copy the bitmap in the region you selected:
       GetDC(NULL)//Get entire screen dc
       CDC::BitBlt()//copy the bits of selected region to your desire dc
      

  2.   

    定义两个CPoint,bool m_bFirst=ture;
    在lbuttondown
    中if(m_bFirst)
    { m_FirstPoint=point;
    m_bFirst=false
    }
    else
    m_SecondPoint=point;
      

  3.   

    http://www.vckbase.com/document/viewdoc.asp?id=235