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