📄 handwritingview.h
字号:
// HandwritingView.h : interface of the CHandwritingView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_HANDWRITINGVIEW_H__C7648E4D_F227_11D5_BBF5_DDBDD6D93A24__INCLUDED_)
#define AFX_HANDWRITINGVIEW_H__C7648E4D_F227_11D5_BBF5_DDBDD6D93A24__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MyTypedef.h"
class CHandwritingView : public CView
{
protected: // create from serialization only
CHandwritingView();
DECLARE_DYNCREATE(CHandwritingView)
// Attributes
public:
CHandwritingDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHandwritingView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
//初始函数与重画函数
void Init();
void Draw();
//位图文件读取函数与位图显示函数
void ReadBitmap();
DWORD Pow2(UINT x);
void DrawBitmap(MYBITMAP *pBmp,int x0,int y0,CClientDC *dc);
//笔划删除与手写字显示函数
void DeleteStrokes();
void Writing(STROKES *Strokes,BYTE Style,BYTE Interval,bool Fast,BYTE ratio,int x0,int y0,CClientDC *dc,bool bFlash);
virtual ~CHandwritingView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
STROKES *Strokes; //字符笔划链表
STROKE oneStroke; //一个笔划
STROKES *pCurrentStroke; //指向字符笔划链表的最后一个节点
bool bmp; //存在有效手写字符位图
PMYBITMAP pBuff; //绘图缓冲区
UINT biWidth,biHeight; //位图宽度与高度
bool bErase; //重画指示
OPSTATUS sOperated; //操作状态
CClientDC *m_pDC; //设备上下文指针
UINT uLines; //画线数目
UINT Stepth; //录制步骤
bool bLining; //录制画线状态
CPoint m_pOld; //旧画线端点
CPoint m_pOrigin; //画线起点
HCURSOR m_hCursor; //画线光标
// Generated message map functions
protected:
//{{AFX_MSG(CHandwritingView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnbtnCoordinate();
afx_msg void OnbtnPlay();
afx_msg void OnbtnRecord();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnbtnOpenBmp();
afx_msg void OnbtnSample();
afx_msg void OnUpdatebtnCoordinate(CCmdUI* pCmdUI);
afx_msg void OnbtnEnd();
afx_msg void OnUpdatebtnEnd(CCmdUI* pCmdUI);
afx_msg void OnUpdatebtnOpenBmp(CCmdUI* pCmdUI);
afx_msg void OnUpdatebtnPlay(CCmdUI* pCmdUI);
afx_msg void OnUpdatebtnRecord(CCmdUI* pCmdUI);
afx_msg void OnUpdatebtnSample(CCmdUI* pCmdUI);
afx_msg void OnbtnRefresh();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in HandwritingView.cpp
inline CHandwritingDoc* CHandwritingView::GetDocument()
{ return (CHandwritingDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HANDWRITINGVIEW_H__C7648E4D_F227_11D5_BBF5_DDBDD6D93A24__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -