作用:缩小矩形的边长。

void   DeflateRect(int   x,int   y);  
  void   DeflateRect(SIZE   size);  
  void   DeflateRect(LPCRECT   lpRect);  
  void   DeflateRect(int   l,int   t,int   b);  
  参数:  
  x   指定要向左或向右移动CRect边的数量  
  y   指定要向上或向下移动CRect边的数量  
  size   指定CRect移动数量的SIZE或CSize。  
            cx   指定移动左右边的数;  
            cy   指定移动上下边的数;  
  lpRect   指向一个指定每边数量的RECT结构或者CRect。  
  说明:   DeflateRect   通过朝它的中心移动边以缩小CRect

====================

例子:CRect   rect(10,   10,   50,   50);  
             rect.DeflateRect(1,   2);     //两边缩小后的rect.left=11,rect.top=12, rect.right=49,rect.bottom=48

Rand Posts: