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

📄 rcimeview.h

📁 这是一个提供给使用遥控器的嵌入式设备开发的一个中文拼音输入法
💻 H
字号:
#if !defined(AFX_RCIMEVIEW_H__9D623978_22BA_4A3C_87CF_1ED22CAFB2DA__INCLUDED_)
#define AFX_RCIMEVIEW_H__9D623978_22BA_4A3C_87CF_1ED22CAFB2DA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define DRAW_SHENGMU 0
#define DRAW_YUNMU 1
#define DRAW_HANZI 2
#define GOTTEN_HANZI 3
#define BUFFER_SIZE 512
#define YUNMUSUM 36
#define YUNMULEN 8
#define YUNMUDESC 36*8
#define SHENGMUSUM 24
#define SHENGMULEN 5
#define SHENGMUDESC 24*5
// RCIMEView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRCIMEView view

class CRCIMEView : public CView
{
public:
	CRCIMEView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CRCIMEView)

// Attributes
public:
	virtual BOOL CRCIMEView::MyCreate(CWnd* pParent,CRect rPos,UINT nCallMsgSY,UINT nCallMsgHZ,CFont* pFontNum,CFont* pFontStr, COLORREF clrStr, COLORREF clrNum,COLORREF clrBand[],int nNumHi);
	BOOL m_bDrawing;
	int m_nLineWidth;
	COLORREF m_cLineColor;
	COLORREF m_cFillColor;
	COLORREF m_cFocusColor;
	CDC* m_pMemDC;
	enum drawing
	{
		isdrawshengmu  =  DRAW_SHENGMU,
		isdrawyunmu    =  DRAW_YUNMU,
		isdrawhanzi    =  DRAW_HANZI,
		isgottenhanzi  =  GOTTEN_HANZI
	}isdrawing;
	void DrawBtn(CDC* pDC,CBrush* brush,CPen* wpen,CPen* bpen,int x,int y,int hspan,int vspan);
	void DrawInterface(CDC* pDC);
	static void TextOut(CDC* pDC, CPoint p, CString s) {
		pDC->ExtTextOut(p.x, p.y, 0, NULL, s, s.GetLength(), 0);
	}

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRCIMEView)
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CRCIMEView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
public:
	BOOL IsEnableHZ();
	BOOL CanEscape();
	WCHAR szBuf[BUFFER_SIZE];
	//int m_combination[25][28];
	WCHAR m_yunmudesc[YUNMUDESC];//35*8
	//int m_yunmulen[35];
	WCHAR m_shengmudesc[SHENGMUDESC];//24*5
	//int m_shengmulen[24];
	int m_hanzisum;
	int m_PageNo;
	BOOL m_multipages;
	void DrawHanZi(CDC* pDC,CPoint textoutpoint[],WCHAR Buf[],WORD nSum);
	WORD MakeWord(int i,int j);
	int m_selectedhanzi;
	int m_selectedyun;
	int m_selectedsheng;
	void DrawYunMu(CDC* pDC,CPoint textoutpoint[],WCHAR yunmudesc[],int yunsum);
	int m_selected;
	UINT prekeynum;
	void DrawShengMu(CDC* pDC,CPoint textoutpoint[],WCHAR shengmudesc[],int shengsum);
	void GetTextOutPoint(CPoint textoutpoint[],int nSize);
	
	//CPen mypen;
	//CBrush* m_brush;
	//{{AFX_MSG(CRCIMEView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
protected:
	void DrawNum(CDC *pDC,CPoint textoutpoint[],COLORREF clrnum,int hspan);
	void EnableHZ(BOOL b);
	BOOL m_IsShowHZ;
	CString m_fn;
	
	COLORREF m_clrnum;
	COLORREF m_clrstr;
	COLORREF m_clrdisable;
	//void DrawBtnDown(int selected);
	LOGFONT m_lfStr,m_lfNum;
	CFont* m_pFontStr;
	CFont* m_pFontNum;
	COLORREF m_clrBand[9];
	int m_nNumHi;
	int m_showstrsum;
	int nYunMuIndex[35];
	int HanZiIntoString(WCHAR hanzi,CString &str);
	UINT m_nCallMsgSY;
	UINT m_nCallMsgHZ;
};

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

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

#endif // !defined(AFX_RCIMEVIEW_H__9D623978_22BA_4A3C_87CF_1ED22CAFB2DA__INCLUDED_)

⌨️ 快捷键说明

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