//NetTalk
/*------------------------------------------------------------------------------*\
 =============================
   模块名称: GDIX.h
 =============================
 
 [版权]
 
   2000-2002  115软件工厂  版权所有
                                              
\*------------------------------------------------------------------------------*/
#ifndef _GDIX_H_
#define _GDIX_H_

/*--------------------------------------------------------------------------------------*\


\*--------------------------------------------------------------------------------------*/
//
class CRectX
{
public:
	LONG left;
	LONG top;
	LONG right;
	LONG bottom;

public:
	void Normalize();
	void operator =( const RECT& rc);
	POINT CenterPoint();
	const POINT& BottomRight() const;
	const POINT& TopLeft() const;
	SIZE Size() const;
	CRectX(int iLeft,int iTop,int iRight,int iBottom);
	CRectX();
	CRectX(const RECT& rc);
	CRectX(POINT pt,SIZE sz);
	CRectX(POINT lt,POINT rb);
	virtual ~CRectX();
	operator RECT&() const;
	int Width() const;
	int Height() const;

};
RECT* operator &(CRectX& rc);
//
void FillSolidRectX( HDC hDC, const RECT& rect, COLORREF cr );
BOOL Draw3dRectX(HDC hdc,RECT& rect,COLORREF clrTopLeft,COLORREF clrBottomRight,int iPenWidth=1);
void DrawTransBmpX(HDC hDC,RECT& rect,HBITMAP hBmp,int x,int y,COLORREF crMask);
void DrawRectX(HDC hDC,const RECT& rect,COLORREF cr);
void TxtBlt(HDC hdc,char* txt,CRectX& rc,COLORREF crTxt,COLORREF crBg,UINT uFormat,HFONT hf,BOOL bTransparent);
#endif