📄 mywatch.h
字号:
#if !defined(AFX_MYWATCH_H__C4959015_6FCA_11D4_B684_BA6FB458F61C__INCLUDED_)
#define AFX_MYWATCH_H__C4959015_6FCA_11D4_B684_BA6FB458F61C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyWatch.h : header file
//
#define WM_GOODBYE WM_USER + 5
/////////////////////////////////////////////////////////////////////////////
// MyWatch dialog
#include "WatchFace.h"
#include "NumberDisplay.h"
#include "ButtonMouseTool.h"
class MyWatch : public CDialog
{
// Construction
public:
MyWatch(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(MyWatch)
enum { IDD = IDD_DIALOG1 };
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(MyWatch)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
public:
UINT m_ID; //标号
CString m_Title; //对话框的名子
CString m_Name; //电表名
double m_Value; //表值
CString m_Units; //单位
double m_BigValue; //电表的最大值
ButtonMouseTool tool;
UINT m_ButtonID;
int m_NUMBER;
protected:
double m_PrevValue; //上一次测量的值
CView *m_pView;
WatchFace face;
NumberDisplay m_EditDisplay;
BOOL m_LFlag;
BOOL m_BigFlag;
BOOL m_BaiDongFlag;
int m_Number;
double m_tempAngle1,m_tempAngle2;
double m_tempValue;
public:
void DrawScreen( );
MyWatch( CView * );
MyWatch( CView *view,CString m_Tille,UINT id,CString name,double value,CString units,double big );
BOOL Create( );
void SetParam( CString,UINT,CString,double,CString,double );
//对话框的名字,电表ID,电表的名字,电表的值,电表的单位,电表的最大值
// Generated message map functions
//{{AFX_MSG(MyWatch)
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYWATCH_H__C4959015_6FCA_11D4_B684_BA6FB458F61C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -