Minigui学习--RECT
来源:互联网 发布:paperpass 淘宝 编辑:程序博客网 时间:2024/05/17 09:44
1.RECT
(1)定义:
在common.h文件中有如下定义:
typedef struct _RECT
{
/**
* The x coordinate of the upper-left corner of the rectangle.
*/
int left;
/**
* The y coordinate of the upper-left corner of the rectangle.
*/
int top;
/**
* The x coordinate of the lower-right corner of the rectangle.
*/
int right;
/**
* The y coordinate of the lower-right corner of the rectangle.
*/
int bottom;
} RECT;
typedef RECT* PRECT;
在minigui.h文件中有如下定义:
/**
* \var RECT g_rcScr
* \brief Contains the rectangle of the whole screen.
*/
extern MG_EXPORT RECT g_rcScr;
/**
* \def g_rcDesktop
* \brief Contains the rectangle of desktop of the application.
#define g_rcDesktop g_rcScr
例如:
static RECT welcome_rc = {10, 100, 600, 400};
SetRect (&welcome_rc, 10, 10, g_rcScr.right - 10,g_rcScr.bottom / 2 - 10);
CreateInfo.lx = 0;
CreateInfo.ty = 0;
CreateInfo.rx = g_rcScr.right;
CreateInfo.by = g_rcScr.bottom;
(2)相关函数:
static inline void SetRect (RECT* prc, int left, int top, int right, int bottom); //sets the rectangle with specified values,note Defined as an inline function for _USE_NEWGAL
static inline void SetRectEmpty (RECT* prc); //This function will sets all coordinates of the rectangle to be zero, Defined as an inline function for _USE_NEWGAL.
static inline void OffsetRect (RECT* prc, int x, int y); //x must be a negative value to move the rectangle to the left, and y must be a negative value to move the rectangle up,note Defined as an inline function for _USE_NEWGAL
2.POINT
(1)定义:
typedef struct _POINT
{
/**
* The x coordinate of the point.
*/
int x;
/**
* The y coordinate of the point.
*/
int y;
} POINT;
typedef POINT* PPOINT;
- Minigui学习--RECT
- minigui学习笔记-按钮
- MiniGUI学习笔记
- MINIGUI学习总结一
- MINIGUI学习总结
- Minigui的深入学习
- 继续学习minigui!!
- 深入学习minigui!
- Minigui学习---字符集
- Minigui学习--绘制
- Minigui学习--DC
- Minigui学习--光标
- Minigui学习--icon
- Minigui学习--font
- 学习miniGUI的问题
- MINIGUI学习总结一
- opencv系列学习一 Rect
- rect
- 素数筛法
- javascript关键字加亮加连接
- 百度和高德手机导航全部免费使用,其他导航厂商将何去何从?
- Unity3d 调用C++写的DLL
- linux下可执行程序如何定位共享库文件以及如何让系统找到用户指定的库 .
- Minigui学习--RECT
- android avd 加速 - 使用Intel HAXM
- Linux 中的rename命令
- 找小于某一整数内的素数
- cocos2d-x CCSpriteFrameCache类使用总结
- VC++中 COM的方法说明
- 链栈
- ocx控件获取使用App的窗口句柄
- hdu4612 Warm up 树形dp 桥 强连通分量