126 lines
3.0 KiB
C++
126 lines
3.0 KiB
C++
|
|
// MainFrm.h: CMainFrame 类的接口
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
#include <iostream>
|
|
|
|
#include "MCADoc.h"
|
|
#include "ControlView.h"
|
|
|
|
class CMainFrame : public CFrameWnd
|
|
{
|
|
|
|
protected: // 仅从序列化创建
|
|
CMainFrame() noexcept;
|
|
DECLARE_DYNCREATE(CMainFrame)
|
|
|
|
// 特性
|
|
protected:
|
|
CSplitterWnd m_wndSplitter;
|
|
CSplitterWnd m_wndSplitter2;
|
|
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:
|
|
CMCADoc* pDoc = nullptr;
|
|
CControlView* pView = nullptr;
|
|
int RoundupPowerof2(int val);
|
|
double GetMilliTime();
|
|
void UpdateValue();
|
|
void SaveFirst();
|
|
void SmoothThree();
|
|
void SmoothFive();
|
|
|
|
// 消息处理
|
|
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();
|
|
afx_msg void OnDataPeak();
|
|
|
|
// 点击状态
|
|
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);
|
|
|
|
// 寻峰
|
|
double vX[256]{};
|
|
double vY[256]{};
|
|
};
|
|
|
|
|