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

📄 gwnd.h

📁 一个简单而又高效的嵌入式操作系统.包括GUI及文件系统.仿Windows设计,类似于MFC风格
💻 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_)

⌨️ 快捷键说明

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