⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crect.h

📁 基于Windml2.0的窗口系统原代码 , 以及和MFC CDC兼容的CDC
💻 H
字号:
////////////////////////////////////////////////////////////////////////
//
//  作者:
//  创建日期:
//  最后修改日期:
//	说明:本类是为兼容MFC中CRect类而设计,它与地理信息系统CGIS_Rect类
//	      在实现上有所不同(注意方法CRect::NormalizeRect的设计)
//	
////////////////////////////////////////////////////////////////////////

#ifndef CRect_h
#define CRect_h 1
#include "cpoint.h"
#include "csize.h"


//##ModelId=3FC7047F0101
class CRect 
{
	
public:
    //##ModelId=3FC704800077
	int left;
    //##ModelId=3FC704800078
	int right;
    //##ModelId=3FC704800081
	int top;
    //##ModelId=3FC704800082
	int bottom;
	
public:
    //##ModelId=3FC70480008B
    CRect ();
    //##ModelId=3FC70480008C
    CRect (int left, int top, int right, int bottom);
    //##ModelId=3FC704800091
    CRect(CPoint point,CSize size);
    //##ModelId=3FC704800096
    CRect(CPoint leftTop,CPoint rightBottom);


    //##ModelId=3FC704800099
    const CRect & operator=(const CRect &rect);
    //##ModelId=3FC70480009B
    CRect  operator=(CRect rect);
    //##ModelId=3FC7048000A0
    int operator==(const CRect &rect) const;
    //##ModelId=3FC7048000A3
    int operator!=(const CRect &rect) const;

    //##ModelId=3FC7048000A9
	int Width();
    //##ModelId=3FC7048000AA
	int Height();
	
    //##ModelId=3FC7048000AB
	int Left() const;
    //##ModelId=3FC7048000AD
	int Right () const;
    //##ModelId=3FC7048000AF
	int Top() const;
    //##ModelId=3FC7048000B1
	int Bottom() const;

    //##ModelId=3FC7048000B4
    bool PtInRect (int x, int y);
    //##ModelId=3FC7048000B7
    bool  PtInRect(POINT point);
    //##ModelId=3FC7048000B9
    bool  PtInRect(CPoint point);
    
    //##ModelId=3FC7048000BE
    void NormalizeRect ();
    
    //##ModelId=3FC7048000BF
    const CPoint TopLeft( ) const;
    //##ModelId=3FC7048000C1
    const CPoint BottomRight( ) const;
    //##ModelId=3FC7048000C3
    CPoint CenterPoint( ) const;
      

};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -