CText2View.h
上传用户:jxd368
上传日期:2013-06-20
资源大小:66k
文件大小:2k
源码类别:

文本生成

开发平台:

Visual C++

  1. // CText2View.h : CCText2View 类的接口
  2. //
  3. #pragma once
  4. #include "textDialog1.h"
  5. class CCText2View : public CView
  6. {
  7. protected: // 仅从序列化创建
  8. CCText2View();
  9. DECLARE_DYNCREATE(CCText2View)
  10. // 属性
  11. public:
  12. CCText2Doc* GetDocument() const;
  13. // 操作
  14. public:
  15. int posX,posY;
  16. CString textString;//用于显示的处理文本
  17. CString oldString;//原来的文本
  18. ctextDialog1 textDialog;
  19.     int speed;
  20. int width;//屏幕宽度
  21. int height;//屏幕高度
  22. int size;//字体大小
  23. int columnCount;
  24. int model;//对齐模式 
  25. bool bModify;
  26. // 重写
  27. public:
  28.     int count(CString string,int rowNum);
  29. virtual void OnDraw(CDC* pDC);  // 重写以绘制该视图
  30. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  31. protected:
  32. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  33. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  34. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  35. // 实现
  36. public:
  37. virtual ~CCText2View();
  38. #ifdef _DEBUG
  39. virtual void AssertValid() const;
  40. virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42. protected:
  43. // 生成的消息映射函数
  44. protected:
  45. DECLARE_MESSAGE_MAP()
  46. public:
  47. afx_msg void OnTimer(UINT nIDEvent);
  48. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  49. afx_msg void OnMenu();
  50. afx_msg void OnBnClickedButton1();
  51. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  52. afx_msg void OnMymenuFont();
  53. LOGFONT m_lf;
  54. COLORREF m_cTextColor;
  55. afx_msg void OnAlignLeft();
  56. afx_msg void OnAlignRight();
  57. afx_msg void OnAlinCenter();
  58. };
  59. #ifndef _DEBUG  // CText2View.cpp 的调试版本
  60. inline CCText2Doc* CCText2View::GetDocument() const
  61.    { return reinterpret_cast<CCText2Doc*>(m_pDocument); }
  62. #endif