This repository has been archived on 2022-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
Multichannel-Analyzer/MCA/MainFrm.h

116 lines
2.8 KiB
C
Raw Normal View History

2022-03-19 20:43:29 +08:00

// MainFrm.h: CMainFrame 类的接口
//
#pragma once
2022-06-02 14:57:51 +08:00
#include "MCADoc.h"
#include "ControlView.h"
2022-06-02 14:57:51 +08:00
2022-03-19 20:43:29 +08:00
class CMainFrame : public CFrameWnd
{
protected: // 仅从序列化创建
CMainFrame() noexcept;
DECLARE_DYNCREATE(CMainFrame)
// 特性
protected:
CSplitterWnd m_wndSplitter;
CSplitterWnd m_wndSplitter2;
2022-03-19 20:43:29 +08:00
public:
// 操作
public:
// 重写
public:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
// 实现
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // 控件条嵌入成员
CToolBar m_wndToolBar;
CStatusBar m_wndStatusBar;
// 生成的消息映射函数
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
DECLARE_MESSAGE_MAP()
public:
2022-06-02 14:57:51 +08:00
CMCADoc* pDoc = nullptr;
CControlView* pView = nullptr;
int RoundupPowerof2(int val);
double GetMilliTime();
void UpdateValue();
void SaveFirst();
void SmoothThree();
void SmoothFive();
2022-06-02 14:57:51 +08:00
// 消息处理
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnClose();
virtual BOOL PreTranslateMessage(MSG* pMsg);
// 工具栏图标
CImageList m_imgList;
void OnLoadToolBarIcon();
// 菜单与工具栏响应
afx_msg void OnOptOpen();
afx_msg void OnOptSave();
afx_msg void OnStaStart();
afx_msg void OnStaStop();
afx_msg void OnStaClear();
afx_msg void OnSimuCo();
afx_msg void OnSimuCs();
afx_msg void OnSimuNa();
afx_msg void OnAxisLinear();
afx_msg void OnAxisLog();
afx_msg void OnRangeAuto();
afx_msg void OnRangeD4();
afx_msg void OnRangeD2();
afx_msg void OnRangeM2();
afx_msg void OnRangeM4();
afx_msg void OnDataOrigin();
afx_msg void OnData3();
afx_msg void OnData5();
// 点击状态
BOOL m_bStartFlag = TRUE;
BOOL m_bStopFlag = FALSE;
BOOL m_bClearFlag = FALSE;
BOOL m_bCoFlag = TRUE;
BOOL m_bCsFlag = FALSE;
BOOL m_bNaFlag = TRUE;
BOOL m_bLinearFlag = FALSE;
BOOL m_bLogFlag = TRUE;
BOOL m_bAutoFlag = FALSE;
BOOL m_bOriginFlag = FALSE;
BOOL m_bTSmoothFlag = TRUE;
BOOL m_bFSmoothFlag = TRUE;
afx_msg void OnUpdateStaStart(CCmdUI* pCmdUI);
afx_msg void OnUpdateStaStop(CCmdUI* pCmdUI);
afx_msg void OnUpdateStaClear(CCmdUI* pCmdUI);
afx_msg void OnUpdateSimuCo(CCmdUI* pCmdUI);
afx_msg void OnUpdateSimuCs(CCmdUI* pCmdUI);
afx_msg void OnUpdateSimuNa(CCmdUI* pCmdUI);
afx_msg void OnUpdateAxisLinear(CCmdUI* pCmdUI);
afx_msg void OnUpdateAxisLog(CCmdUI* pCmdUI);
afx_msg void OnUpdateRangeAuto(CCmdUI* pCmdUI);
afx_msg void OnUpdateDataOrigin(CCmdUI* pCmdUI);
afx_msg void OnUpdateData3(CCmdUI* pCmdUI);
afx_msg void OnUpdateData5(CCmdUI* pCmdUI);
2022-03-19 20:43:29 +08:00
};