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

📄 hikerwbstatewnd.h

📁 自己用Markov模型做的一个整句物笔输入法的原型
💻 H
字号:
#if !defined(AFX_HIKERWBSTATEWND_H__9C5F87B5_9EAB_46CA_8FEB_1DAB880B4AB4__INCLUDED_)
#define AFX_HIKERWBSTATEWND_H__9C5F87B5_9EAB_46CA_8FEB_1DAB880B4AB4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HikerWBStateWnd.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CHikerWBStateWnd window

class CHikerWBStateWnd : public CWnd
{
// Construction
public:
	CHikerWBStateWnd();

// Attributes
public:
	HWND	m_hInputWnd;
	HWND	m_hFocusWnd;

	CString m_code;
	CString m_word;
	CString m_sent;
	BOOL	m_bFullCode;

	CPoint	m_pos;
	CRect  m_rect;
	int		m_iAct;
	int		m_iHangOn;		//which button the mouse is hanging on
	int		m_iLastHangOn;
	int		m_wordnum;
	
	CRect m_rc;
	CRect m_rw;
	CRect m_rs;
	CRect m_rp;
	CRect m_rwpu;
	CRect m_rwpd;
	CRect m_rspu;
	CRect m_rspd;

	CRect m_rchs;		//中英文
	CRect m_rsbc;		//全角半角按键
	CRect m_rchspct;	//中文标点
	CRect m_rtmppy;		//临时拼音

	BOOL m_bWdPgUpEnb;
	BOOL m_bWdPgDnEnb;
	BOOL m_bStPgUpEnb;
	BOOL m_bStPgDnEnb;

	CRect m_rslog;					//logical aear for sentence
	CRect m_rsview;					//visible aera for showing sentence
	CRect m_cDefaultPos;
	BOOL  m_bFloatWnd;
		
	CFont m_font;

	int m_iCurrWdLoc;
	int m_iCurrWdLen;
	int m_iCurrWdPt;
	int m_iCurrWdWid;

	COLORREF m_crWndBack;
	COLORREF m_crWndBord;
	COLORREF m_crLine;
	COLORREF m_crTxtBack;
	COLORREF m_crCaret;
	COLORREF m_crTxtFore;
	COLORREF m_crHiTxtBack;
	COLORREF m_crHiTxtFore;


	BOOL m_bChsSta;
	BOOL m_bSbcSta;
	BOOL m_bChsPct;

	HICON m_hiChs0;
	HICON m_hiChs1;
	HICON m_hiSbc0;
	HICON m_hiSbc1;
	HICON m_hiChsPct0;
	HICON m_hiChsPct1;

	CSize	m_ScreenSize;
	CPoint m_ptcornw;
	CPoint m_ptcorn;

	const int* m_wslen;
	int wordnum;

// Operations
public:
	void SetCode(LPCSTR pCode, BOOL bFull = TRUE);
	void SetWord(LPCSTR pWord);
	void SetWord(LPCSTR pWord, int giPageNo, int selwordnum);
	void SetSent(LPCSTR pSent, int* wslen, int wdnum, int iPos);
	void Clean();
	void ShowFloat(CPoint pt);
	void ShowFix();
	void SetFloat(BOOL bFloat);
	BOOL GetFloat();
	void SetChsSta(BOOL bSta);
	void SetSbcSta(BOOL bSta);
	void SetChsPct(BOOL bSta);
	void ReleaseFocus();


private:
	void LockInputWnd();
	void UpdateRects();
	int	 HitTest(CPoint pt);
	void DrawArrow(CDC* dc, CRect rt, int direct, BOOL enable);
	CRect GetRect(int iAct);
	int GetWordIndex(CPoint pt);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHikerWBStateWnd)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CHikerWBStateWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CHikerWBStateWnd)
	afx_msg void OnMenuAbout();
	afx_msg void OnMenuExit();
	afx_msg void OnPaint();
	afx_msg void OnMenuHelp();
	afx_msg void OnMenuStyle();
	afx_msg void OnMenuGb2312();
	afx_msg void OnMenuGbk();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	afx_msg void OnMenuSkb(int nID);
	
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_HIKERWBSTATEWND_H__9C5F87B5_9EAB_46CA_8FEB_1DAB880B4AB4__INCLUDED_)

⌨️ 快捷键说明

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