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

📄 mainfrm.h

📁 ucOS 模拟环境
💻 H
字号:
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__3E0DFB49_DA8B_11D4_AB9E_0050BAA6797D__INCLUDED_)
#define AFX_MAINFRM_H__3E0DFB49_DA8B_11D4_AB9E_0050BAA6797D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CKeyQueue
{
public:
	CKeyQueue(int size);
	~CKeyQueue();
	
	unsigned char GetValue(void);
	void Clear(void);
	bool AddValue(unsigned char val);
	bool HasValue(void);
	unsigned char TestValue(void);
	
protected:
	int bufsize;
	unsigned char *pQueueBuf;
	int head;
	int tail;
	
	int synchronize;
};




class CMyView : public CWnd
{
// Construction
public:
	CMyView();
	virtual ~CMyView();
// Attributes
public:

	POINT GetKeyboardStartPos(void);
	CRect GetKeyboardBmpRect(void);
	void ShowKeyboard(CDC *pDC);
	void OnDraw(int zoom, BOOL powerOn);

	CRect GetLcdRect(void);
	void DrawLCDBorder(CDC* pDC, int zoom);

	void InvertKeyState();
	void ArrangeScreen( int zoom);
	
public:
	int m_ScrLeft;
	int m_ScrTop;
	int m_ScrWidth;
	int m_ScrHeight;
	int	m_nCurKeyNo;
	CBitmap m_bmpKeyboard;

private:
	int KeyCount;

public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyView)
	public:
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyView)
	afx_msg void OnPaint(void);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

#define MAX_ZOOM_NUM 2

class CMainFrame : public CFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();
	virtual ~CMainFrame();
public:

	void CalWinPos();
	void OnDraw(CDC *pDc, int PowerOn );

	void UpdateScr();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

// Attributes
public:
	CWinThread *m_pTheThread;
	BYTE BitmapBuf[240*MAX_ZOOM_NUM][(320/8*MAX_ZOOM_NUM+3)/4*4];		//for RGB bitmap
    
	CMyView  keyboard;  //Added by Xiong Xiaolin,used to deal with keybord view!
	CRect	 m_mainWndRect;//added by dcj for remembering old mainwindow postion
// Operations
	CString strSeqName;
public:
	HCURSOR hcArrow;
	HCURSOR hcWait;
public:
	int m_nTotalLines;			// autotest seq line num;
	int m_nCurLineNo;			// autotest current process line no;

	int m_nZoomNum;
	
	CTime m_StartTime;

public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

	void BeginWaitMouse();
	void EndWaitMouse();


// Implementation
// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();
	afx_msg void OnClose();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnZoom2();
	afx_msg void OnZoom1();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__3E0DFB49_DA8B_11D4_AB9E_0050BAA6797D__INCLUDED_)

⌨️ 快捷键说明

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