-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathQueryDialog.cpp
More file actions
64 lines (53 loc) · 1.36 KB
/
QueryDialog.cpp
File metadata and controls
64 lines (53 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// QueryDialog.cpp : implementation file
//
#include "stdafx.h"
#include "Wincc.h"
#include "QueryDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CQueryDialog dialog
CQueryDialog::CQueryDialog(CWnd* pParent /*=NULL*/)
: CDialog(CQueryDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CQueryDialog)
c = -1;
m_show1 = 0;
m_show2 = 0;
m_show3 = 0;
m_show4 = 0;
m_show5 = 0;
//}}AFX_DATA_INIT
}
void CQueryDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CQueryDialog)
DDX_Radio(pDX, IDC_C0, c);
DDX_Text(pDX, IDC_SHOW1, m_show1);
DDX_Text(pDX, IDC_SHOW2, m_show2);
DDX_Text(pDX, IDC_SHOW3, m_show3);
DDX_Text(pDX, IDC_SHOW4, m_show4);
DDX_Text(pDX, IDC_SHOW5, m_show5);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CQueryDialog, CDialog)
//{{AFX_MSG_MAP(CQueryDialog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CQueryDialog message handlers
void CQueryDialog::Show(char* buffer)//获取从机发过来的数据并处理 再显示在上位机上
{
UpdateData();
m_show1=buffer[0];
m_show2=buffer[1];
m_show3=buffer[2];
m_show4=buffer[3];
m_show5=buffer[4];
UpdateData(FALSE);
}