?? oscilloscopedlg.h
字號:
// OscilloscopeDlg.h : header file
//
#include "CurveFrame.h"
#include "RoundButton.h"
#include "BitmapDialog.h"
#include "RotateButton.h"
#include "SwitchButton.h"
#if !defined(AFX_OSCILLOSCOPEDLG_H__85E4372B_AB2E_4384_BBB3_23EFEBBB1AA5__INCLUDED_)
#define AFX_OSCILLOSCOPEDLG_H__85E4372B_AB2E_4384_BBB3_23EFEBBB1AA5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// COscilloscopeDlg dialog
void CreateWave(UINT signaltype,
int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
void SineWave(int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
void RandWave(int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
void SawtoothWave(int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
void TriangleWave(int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
void SquareWave(int firstPos,
int n,
double amp,
double freqSignal,
double freqSample,
double phase,
double offset,
double data[]);
class COscilloscopeDlg : public CBitmapDialog
{
// Construction
public:
COscilloscopeDlg(CWnd* pParent = NULL); // standard constructor
public:
void DrawClient(CWnd* pWnd);
BOOL m_bStart; //顯示波形的標志位
COLORREF m_Color; //存儲顏色臨時變量
int m_nCurChannel; //當前選中的通道,主要為設置通道用
int m_nNumPerCircle[3]; //每個周期的采樣點數
int m_nCurNumOfSample[3];//當前采樣的點的起始位置
BOOL m_bChannel[3];//每個通道的開啟狀態
struct _Signal
{
UINT SignalType; //波形
double Frequency; //信號頻率
double Phase; //相位
double Amplitude; //振幅
double Offset; //偏移
double Data[1024]; //離散數字
int Number; //在離散數字中的有效數從0開始的個數,也就是顯示器上每屏的采樣點數
}Signal[3];
_Signal RetriveSignal[5][3];
int nTimes;
void SaveSignal(_Signal signal0, _Signal signal1, _Signal signal2);
void SaveDlgItemRect(CDialog *pDlg, int firstItem, int lastItem);
void ResizeDlgItem(CDialog *pDlg, int firstItem, int lastItem);
CRect rcDlg;
CRect rcItem[20];//
// Dialog Data
//{{AFX_DATA(COscilloscopeDlg)
enum { IDD = IDD_OSCILLOSCOPE_DIALOG };
CSwitchButton m_btnSignalType;
CSwitchButton m_btnChannel;
CScrollBar m_ScrollBar;
CRotateButton m_btnFreqSample;
CRotateButton m_btnWidth;
CRotateButton m_btnPhase;
CRotateButton m_btnOffset;
CRotateButton m_btnAmplitude;
CRotateButton m_btnFreqSignal;
CRoundButton m_OkRndBtn;
CRoundButton m_StartRndBtn;
CRoundButton m_ChTwoRndBtn;
CRoundButton m_ChThreeRndBtn;
CRoundButton m_ChOneRndBtn;
CCurveFrame m_ctrlCurveFrame;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COscilloscopeDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(COscilloscopeDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg void OnStart();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnSelectcolor();
afx_msg void OnSelchangeCmbChannel();
afx_msg void OnSelchangeCmbSignaltype();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnBtnFreqsignal();
afx_msg void OnBtnAmplitude();
afx_msg void OnBtnOffset();
afx_msg void OnBtnPhase();
afx_msg void OnBtnWidth();
afx_msg void OnBtnFreqsample();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnBtnChanel();
afx_msg void OnBtnSignaltype();
//}}AFX_MSG
afx_msg void OnChannel(UINT nID);
afx_msg UINT OnNcHitTest(CPoint point);
afx_msg void OnNcPaint();
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_OSCILLOSCOPEDLG_H__85E4372B_AB2E_4384_BBB3_23EFEBBB1AA5__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -