MainFrm.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**************************************************************************************************
  2. 版本所有(C), 2020-2022, 北京普达迪泰
  3. ***************************************************************************************************
  4. 文 件 名: MainFrm.h
  5. 功能描述: 程序主框架
  6. 版 本 号: 1.00初版
  7. 作 者: HYF
  8. 生成日期; 2021-12-20
  9. 最近修改:
  10. 函数列表:
  11. 修改历史:
  12. 1.日 期 :2021-12-20
  13. 作 者 : HYF
  14. 修改内容 : 创建文件
  15. **************************************************************************************************/
  16. #pragma once
  17. class CMainFrame : public CFrameWnd
  18. {
  19. protected: // 仅从序列化创建
  20. CMainFrame() noexcept;
  21. DECLARE_DYNCREATE(CMainFrame)
  22. // 特性
  23. public:
  24. // 操作
  25. public:
  26. // 重写
  27. public:
  28. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  29. // 实现
  30. public:
  31. virtual ~CMainFrame();
  32. #ifdef _DEBUG
  33. virtual void AssertValid() const;
  34. virtual void Dump(CDumpContext& dc) const;
  35. #endif
  36. protected: // 控件条嵌入成员
  37. CStatusBar m_wndStatusBar;
  38. // 生成的消息映射函数
  39. protected:
  40. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  41. DECLARE_MESSAGE_MAP()
  42. public:
  43. // 进行视图切换的代码函数
  44. void SwitchToForm(int nForm, DWORD taskId);
  45. afx_msg void OnEquipmentView();
  46. afx_msg void OnReportView();
  47. afx_msg void OnStartView();
  48. afx_msg void OnHelp();
  49. virtual void OnUpdateFrameTitle(BOOL bAddToTitle);
  50. afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
  51. int m_CurViewId;
  52. protected:
  53. afx_msg LRESULT OnStartStaticTask(WPARAM wParam, LPARAM lParam);
  54. afx_msg LRESULT OnStartDynamicTask(WPARAM wParam, LPARAM lParam);
  55. afx_msg LRESULT OnBackToStart(WPARAM wParam, LPARAM lParam);
  56. public:
  57. virtual void ActivateFrame(int nCmdShow = -1);
  58. void OnUpdateStatusTime(CCmdUI *pCmdUI);
  59. afx_msg void OnDestroy();
  60. afx_msg void OnTimer(UINT_PTR nIDEvent);
  61. };