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

📄 inputmethddlg.h

📁 在EVC下的记事本程序
💻 H
字号:
#if !defined(AFX_INPUTMETHDDLG_H__975A3391_4045_4A3D_AEBC_44342FE64AFC__INCLUDED_)
#define AFX_INPUTMETHDDLG_H__975A3391_4045_4A3D_AEBC_44342FE64AFC__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CInputMethddlg dialog

#include "..\\commonsrc\common.h"
#include "..\\commonsrc\commonDef.h"
#include "Notepad.h"

typedef enum INPUT_BTNID
{
	INPUT_BTNRESULT,	//输入的字母结果
	INPUT_BTNONE,		//得到的文字结果1
	INPUT_BTNTWO,		//得出的文字结果2
	INPUT_BTNTHREE,		//得出的文字结果3
	INPUT_BTNFOUR,		//得出的文字结果4
	INPUT_BTNFIVE,		//得出的文字结果5
	INPUT_BTNLEFT,		//左移得出结果
	INPUT_BTNRIGHT,		//右移得出结果
	
	INPUT_BTNBACKSPACE,	//删除键
	INPUT_BTNENTER,		//回车键
	INPUT_BTNLETA,
	INPUT_BTNLETB,
	INPUT_BTNLETC,
	INPUT_BTNLETD,
	INPUT_BTNLETE,
	INPUT_BTNLETF,
	INPUT_BTNLETG,
	INPUT_BTNLETH,
	INPUT_BTNLETI,
	INPUT_BTNLETJ,
	INPUT_BTNLETK,
	INPUT_BTNLETL,
	INPUT_BTNLETM,
	INPUT_BTNLETN,
	INPUT_BTNLETO,
	INPUT_BTNLETP,
	INPUT_BTNLETQ,
	INPUT_BTNLETR,
	INPUT_BTNLETS,
	INPUT_BTNLETT,
	INPUT_BTNLETU,
	INPUT_BTNLETV,
	INPUT_BTNLETW,
	INPUT_BTNLETX,
	INPUT_BTNLETY,
	INPUT_BTNLETZ,
	INPUT_BTNSWITCH,	//大小写切换键
	
	INPUT_BTNMOVEWIN,	//移动窗口
	INPUT_BTNPINYIN,	//拼音输入
	INPUT_BTNSIGN,		//符号键
	INPUT_BTNBLANK,		//空格
	INPUT_BTNEXIT,		//隐藏
	INPUT_BTNEND,
};

struct _MYINPUTBTN 
{
	NOTE_BTNSTATUS nstatus;
	UINT defbmp;
	UINT prebmp;
	RECT rectbtn;
};

class CInputMethddlg : public CDialog
{
// Construction
public:
	CInputMethddlg(CWnd* pParent = NULL);   // standard constructor
	
	void DrawKeyTextToBack(int nID, CDC * pDC);
	void InitResource();
	int GetBtnIDFromPoint(POINT pt);
	void DisplayCharecter();	//解析得出的文字字符串
	void OnTextBtnOne();
	void OnTextBtnTwo();
	void OnTextBtnThree();
	void OnTextBtnFour();
	void OnTextBtnFive();
	
	//	void MyDrawTextToBackEx(CDC *pDC, int charHigh, int charWidth, int left, int top, int right, int bottom, COLORREF crColor, UINT format, unsigned short *text, unsigned short *type);	
	void OnBtnEnter();	//回车键响应函数
	void OnBtnSign();	//数字符号键响应函数
	void OnBtnBlank();	//空格键响应函数
	void OnBtnMoveLeft();
	void OnBtnMoveRight();
	void OnBtnBackSpace();
	void OnBtnPinyin();
	void OnBtnLetA();
	void OnBtnLetB();
	void OnBtnLetC();
	void OnBtnLetD();
	void OnBtnLetE();
	void OnBtnLetG();
	void OnBtnLetI();
	void OnBtnLetJ();
	void OnBtnLetN();
	void OnBtnLetO();
	void OnBtnLetU();
	void OnBtnLetV();
	
	unsigned short g_onestr,g_twostr,g_threestr,g_fourstr,g_fivestr;//各键结果1--5
	CString m_Resultstr,m_letterstr;	//字母结果
	CString m_TextResult;
	BOOL b_pinyinflag;
	
private:
	int g_screenwidth,g_screenheight;
	UINT g_keyswitchflag,g_movewinflag;
	CBitmap bitmapback;
	int g_rightflag;
	BOOL b_wubiflag, b_forbidflag;	//不允许move

	CBitmap LetterResultbmp, CharacterBar; //字母显示条,文字显示条
	CBitmap LetterSel, LetterUnsel;	//字母选中,字母未选中
	CBitmap BigKeySel,BigKeyUnsel;	//大的功能键选中未选中状态
	CBitmap MoveLeftSel,MoveLeftUnsel;
	CBitmap MoveRightSel,MoveRightUnsel;
	CBitmap SignSel,SignUnsel;		//回车,退格键选中未选中状态
	
	
	// Dialog Data
	//{{AFX_DATA(CInputMethddlg)
	enum { IDD = IDD_INPUTMETHOD };
	// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA
	
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CInputMethddlg)
public:
	virtual BOOL DestroyWindow();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual void PostNcDestroy();
	//}}AFX_VIRTUAL
	
	// Implementation
protected:
	HICON m_hIcon;
	
	// Generated message map functions
	//{{AFX_MSG(CInputMethddlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC * pDC);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_INPUTMETHDDLG_H__975A3391_4045_4A3D_AEBC_44342FE64AFC__INCLUDED_)

⌨️ 快捷键说明

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