码迷,mamicode.com
首页 > 其他好文 > 详细

CRect::DeflateRect

时间:2014-07-31 19:58:27      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:io   cti   ar   div   size   text   ef   c   

1基本内容

void DeflateRect(int x,int y);

void DeflateRect(SIZE size);

void DeflateRect(LPCRECT lpRect);

void DeflateRect(int l,int t,int r,int b);

说明:

通过朝CRect的中心移动边以缩小CRect。

参数:

x 指定缩小CRect的左和右边的单位数;

y 指定缩小CRect的上、下边的单位数;

size 指定缩小CRect的单位数的SIZE或CSize;

cx 值指定缩小左、右边的单位数;

cy 指定缩小上、下边的单位数;

lpRect 指向一个RECT结构或CRect,指定缩小每一边的单位数;

l 指定缩小CRect左边的单位数;

t 指定缩小CRect上边的单位数;

r 指定缩小CRect右边的单位数;

b 指定缩小CRect下边的单位数。

 

例子:矩形左右缩小三个单位,上下缩小五个单位.
  CRect   rect(10,   10,   50,   50);   
  rect.DeflateRect(3,   5);     //两边缩小后的rect.left=13,rect.top=15,   
                                                    //rect.right=47,rect.bottom=45  

CRect::DeflateRect,布布扣,bubuko.com

CRect::DeflateRect

标签:io   cti   ar   div   size   text   ef   c   

原文地址:http://www.cnblogs.com/suanec/p/3881197.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!