www.pudn.com > GOS.rar > GWnd.h


// GWnd.h: interface for the GWnd class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_GWnd_H__58B9F9D2_E7C2_4776_B257_48CD1AA52C7E__INCLUDED_) 
#define AFX_GWnd_H__58B9F9D2_E7C2_4776_B257_48CD1AA52C7E__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#define GUI_MAXWND 256 
#define GUI_MAXMSG 256 
 
class GWnd   
{ 
public: 
	const static int m_aColor16Palette[16]; 
	static GWnd* m_pFocus; 
	static GWnd** m_aWnd; 
	static int m_nWndCount; 
	static MSG* m_aMsg; 
	static int m_nMsgStart; 
	static int m_nMsgCount; 
	static void DoEvents(); 
	static void WM_Click(int x,int y,BOOL bDown); 
	static int EdgeRGB(int r,int g,int b); 
	static BOOL PtInRect(int x,int y,RECT& rect); 
public: 
	void DrawEdge(RECT& rect,int nEdge); 
	void Draw3dRect(RECT& rect,int crTopLeft,int crBottomRight); 
	void DrawBitmap(const BITMAP* bm,RECT rect); 
	void DrawText(LPCTSTR szString,RECT rect,int nFormat); 
	void Rectangle(RECT rect); 
	void FillRect(RECT rect,int nColor); 
	void Line(int x1,int y1,int x2,int y2); 
	GWnd(); 
	~GWnd(); 
	virtual void WndProc(int nMessage,int wParam,int lParam); 
 
public: 
	void OnNcPaint(); 
	void OnMove(); 
	void FillRect(RECT rect,int c1,int c2); 
	int EdgeRGB(int c); 
	SIZE GetTextExtent(int nCount); 
	SIZE GetSize(BOOL bClient); 
	POINT GetLocation(); 
	RECT MakeRect(int x,int y,int nWidth,int nHeight); 
	void MoveWindow(int x,int y,int nWidth,int nHeight); 
	void MoveWindow(RECT rect); 
	void PostMessage(int nMessage,int wParam,int lParam); 
public: 
	int m_nBackColor; 
	int m_nForeColor; 
	DWORD m_nStyle; 
	DWORD m_nState; 
	int m_nWndIndex; 
	const FONT* m_pFont; 
	GWnd* m_pParent; 
	RECT m_Rect; 
	RECT m_rectClip; 
	RECT m_rectWnd; 
	RECT m_rectWndClip; 
	KString m_strText; 
}; 
 
#endif // !defined(AFX_GWnd_H__58B9F9D2_E7C2_4776_B257_48CD1AA52C7E__INCLUDED_)