CRect rt;
GetWindowRect(&rt);
rt.Width() 和 rt.Height() 是宽度 和高度  有窗体的X Y坐标吗?
RECT的4个变量是不是矩形的4个点?

解决方案 »

  1.   

    CRect::TopLeft() - 窗口左上角坐标
    CRect::BottomRight() - 窗口右下角坐标
    CRect::CenterPoint() - 窗口中心点坐标三个函数返回的都是 CPoint 类
    RECT.left - 窗口左边界在桌面中的横坐标
    RECT.top - 窗口上边界在桌面中的纵坐标
    RECT.right - 窗口右边界在桌面中的横坐标
    RECT.bottom - 窗口下边界在桌面中的纵坐标
      

  2.   

    TopLeft( ).x
    TopLeft( ).y
      

  3.   


    RECT.left - 窗口左边界在桌面中的横坐标 
    RECT.top - 窗口上边界在桌面中的纵坐标 
    RECT.right - 窗口右边界在桌面中的横坐标 
    RECT.bottom - 窗口下边界在桌面中的纵坐标
    [/Quote]
    同意二楼。
      

  4.   

    CRect::CRect 
    CRect( );CRect( int l, int t, int r, int b );CRect( const RECT& srcRect );CRect( LPCRECT lpSrcRect );CRect( POINT point, SIZE size );CRect( POINT topLeft, POINT bottomRight );以上是MSDN中的CRECT的函数。
    相信看了后就明白了。