📄 warninglimit.cpp
字号:
// warninglimit.cpp : implementation file//#include "stdafx.h"#include "水箱实验.h"#include "warninglimit.h"#include "conio.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// Cwarninglimit dialogCwarninglimit::Cwarninglimit(CWnd* pParent /*=NULL*/) : CDialog(Cwarninglimit::IDD, pParent){ //{{AFX_DATA_INIT(Cwarninglimit) m_downwarning1 = 0; m_downwarning2 = 0; m_upwarning1 = 0; m_upwarning2 = 0; //}}AFX_DATA_INIT}void Cwarninglimit::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(Cwarninglimit) DDX_Control(pDX, IDC_UPWARNING2, m_upwarningedit2); DDX_Control(pDX, IDC_UPWARNING1, m_upwarningedit1); DDX_Control(pDX, IDC_DOWNWARNING2, m_downwarningedit2); DDX_Control(pDX, IDC_DOWNWARNING1, m_downwarningedit1); DDX_Text(pDX, IDC_DOWNWARNING1, m_downwarning1); DDX_Text(pDX, IDC_DOWNWARNING2, m_downwarning2); DDX_Text(pDX, IDC_UPWARNING1, m_upwarning1); DDX_Text(pDX, IDC_UPWARNING2, m_upwarning2); //}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(Cwarninglimit, CDialog) //{{AFX_MSG_MAP(Cwarninglimit) ON_WM_PAINT() //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// Cwarninglimit message handlersBOOL Cwarninglimit::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_upwarningedit2.LimitText(4); m_upwarningedit1.LimitText(4); m_downwarningedit2.LimitText(4); m_downwarningedit1.LimitText(4); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}void Cwarninglimit::OnPaint() { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here HWND edit; GetDlgItem(IDC_UPWARNING1,&edit); ::SetFocus(edit); // Do not call CDialog::OnPaint() for painting messages}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -