RECT 结构

RECT结构定义矩形左上角和右下角的坐标。

typedef struct tagRECT { 
   LONG left; 
   LONG top; 
   LONG right; 
   LONG bottom; 
} RECT;

成员

  • left
    指定矩形左上角的 x 坐标。

  • top
    指定矩形左上角的 y 坐标。

  • right
    指定矩形右下角的 x 坐标。

  • bottom
    指定矩形右下角的 y 坐标。

示例

//Alternate ways to intialize a RECT structure:

RECT rctA;
rctA.left = 20;  
rctA.top = 30;  
rctA.right  = 180;  
rctA.bottom = 230;

RECT rctB = {20,30,180,230};   

要求

标头: windef.h

请参见

参考

CRect 类

其他资源

结构、样式、回调和消息映射